Share & learn

Through Innovative Digital Library

this is giving me error saying no public class found to execute

interface Area
{
    final static float pi= 3.14F;
   float compute(float x, float y);
}
class Rectangle implements Area{
    public float compute(float x, float y){
        return(x*y);
    }
}
class Circle implements Area{
    public float compute(float x, float y){
        return(pi*x*x);
    }
}
class InterfaceTest{
    public static void main (String args[]){
        Rectangle rect = new Rectangle();
        Circle cir = new Circle();
        Area area;
        area = rect;
        System.out.println("Area Rectangle"+ area.compute(10,20));
        area=cir;
        System.out.println("Area circle"+ area.compute(10,0));
    }
}

 



Answers

Posted by Robert on June 2nd 2018 10:30 AM

#!/bin/bash # rsync using variables SOURCEDIR=/home/user/Documents/ DESTDIR=/media/diskid/user_backup/Documents/ rsync -avh --exclude="*.bak" $SOURCEDIR $DESTDIR

#!/bin/bash
# rsync using variables

SOURCEDIR=/home/user/Documents/
DESTDIR=/media/diskid/user_backup/Documents/

rsync -avh --exclude="*.bak" $SOURCEDIR $DESTDIR

Posted by Robert on June 2nd 2018 10:32 AM

/** * Gets EKeys for a principal. * @param princ the target name initiator requests. Not null. * @return keys for the princ, never null, might be empty */ public EncryptionKey[] getEKeys(PrincipalName princ) { if (destroyed) { throw new IllegalStateException("This object is destroyed"); } KerberosKey[] kkeys = getKKeys(new KerberosPrincipal(princ.getName())); if (kkeys.length == 0) { // Fallback: old JDK does not perform real name checking. If the // acceptor has host.sun.com but initiator requests for host, // as long as their keys match (i.e. keys for one can decrypt // the other's service ticket), the authentication is OK. // There are real customers depending on this to use different // names for a single service. kkeys = getKKeys(); } EncryptionKey[] ekeys = new EncryptionKey[kkeys.length]; for (int i=0; i

/**
 * Gets EKeys for a principal.
 * @param princ the target name initiator requests. Not null.
 * @return keys for the princ, never null, might be empty
 */
public EncryptionKey[] getEKeys(PrincipalName princ) {
    if (
destroyed) {
        throw new 
IllegalStateException("This object is destroyed");  } KerberosKey[] kkeys getKKeys(new KerberosPrincipal(princ.getName()));
    if (
kkeys.length == 0) {
        
// Fallback: old JDK does not perform real name checking. If the  // acceptor has host.sun.com but initiator requests for host,
        // as long as their keys match (i.e. keys for one can decrypt     // the other's service ticket), the authentication is OK.
        // There are real customers depending on this to use different    // names for a single service.
        
kkeys getKKeys();
    }
    
EncryptionKey[] ekeys = new EncryptionKey[kkeys.length];
    for (
int i=0i<ekeys.lengthi++) {
        
ekeys[i] =  new EncryptionKey(
                    
kkeys[i].getEncoded(), kkeys[i].getKeyType(),
                    new 
Integer(kkeys[i].getVersionNumber()));
    }
    return 
ekeys;
}

Posted by Robert on June 2nd 2018 10:33 AM

/** * Gets EKeys for a principal. * @param princ the target name initiator requests. Not null. * @return keys for the princ, never null, might be empty */ public EncryptionKey[] getEKeys(PrincipalName princ) { if (destroyed) { throw new IllegalStateException("This object is destroyed"); } KerberosKey[] kkeys = getKKeys(new KerberosPrincipal(princ.getName())); if (kkeys.length == 0) { // Fallback: old JDK does not perform real name checking. If the // acceptor has host.sun.com but initiator requests for host, // as long as their keys match (i.e. keys for one can decrypt // the other's service ticket), the authentication is OK. // There are real customers depending on this to use different // names for a single service. kkeys = getKKeys(); } EncryptionKey[] ekeys = new EncryptionKey[kkeys.length]; for (int i=0; i

/**
 * Gets EKeys for a principal.
 * @param princ the target name initiator requests. Not null.
 * @return keys for the princ, never null, might be empty
 */
public EncryptionKey[] getEKeys(PrincipalName princ) {
    if (
destroyed) {
        throw new 
IllegalStateException("This object is destroyed");  } KerberosKey[] kkeys getKKeys(new KerberosPrincipal(princ.getName()));
    if (
kkeys.length == 0) {
        
// Fallback: old JDK does not perform real name checking. If the  // acceptor has host.sun.com but initiator requests for host,
        // as long as their keys match (i.e. keys for one can decrypt     // the other's service ticket), the authentication is OK.
        // There are real customers depending on this to use different    // names for a single service.
        
kkeys getKKeys();
    }
    
EncryptionKey[] ekeys = new EncryptionKey[kkeys.length];
    for (
int i=0i<ekeys.lengthi++) {
        
ekeys[i] =  new EncryptionKey(
                    
kkeys[i].getEncoded(), kkeys[i].getKeyType(),
                    new 
Integer(kkeys[i].getVersionNumber()));
    }
    return 
ekeys;
}
 


/**
 * Gets EKeys for a principal.
 * @param princ the target name initiator requests. Not null.
 * @return keys for the princ, never null, might be empty
 */
public EncryptionKey[] getEKeys(PrincipalName princ) {
    if (
destroyed) {
        throw new 
IllegalStateException("This object is destroyed");  } KerberosKey[] kkeys getKKeys(new KerberosPrincipal(princ.getName()));
    if (
kkeys.length == 0) {
        
// Fallback: old JDK does not perform real name checking. If the  // acceptor has host.sun.com but initiator requests for host,
        // as long as their keys match (i.e. keys for one can decrypt     // the other's service ticket), the authentication is OK.
        // There are real customers depending on this to use different    // names for a single service.
        
kkeys getKKeys();
    }
    
EncryptionKey[] ekeys = new EncryptionKey[kkeys.length];
    for (
int i=0i<ekeys.lengthi++) {
        
ekeys[i] =  new EncryptionKey(
                    
kkeys[i].getEncoded(), kkeys[i].getKeyType(),
                    new 
Integer(kkeys[i].getVersionNumber()));
    }
    return 
ekeys;
}
 


/**
 * Gets EKeys for a principal.
 * @param princ the target name initiator requests. Not null.
 * @return keys for the princ, never null, might be empty
 */
public EncryptionKey[] getEKeys(PrincipalName princ) {
    if (
destroyed) {
        throw new 
IllegalStateException("This object is destroyed");  } KerberosKey[] kkeys getKKeys(new KerberosPrincipal(princ.getName()));
    if (
kkeys.length == 0) {
        
// Fallback: old JDK does not perform real name checking. If the  // acceptor has host.sun.com but initiator requests for host,
        // as long as their keys match (i.e. keys for one can decrypt     // the other's service ticket), the authentication is OK.
        // There are real customers depending on this to use different    // names for a single service.
        
kkeys getKKeys();
    }
    
EncryptionKey[] ekeys = new EncryptionKey[kkeys.length];
    for (
int i=0i<ekeys.lengthi++) {
        
ekeys[i] =  new EncryptionKey(
                    
kkeys[i].getEncoded(), kkeys[i].getKeyType(),
                    new 
Integer(kkeys[i].getVersionNumber()));
    }
    return 
ekeys;
}
Answer Question

Your email address will not be published. Required fields are marked *

  • Minimum 20 character
WWHX

related questions

Most liked questions

Most answered questions

Login
WWHX Refresh
Register
WWHX Refresh
Forgot password
Ask a Question
Minimum 20 character
Minimum 20 character
Reply
Minimum 20 character
WWHX Refresh