LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Java using interfaces please help me (https://www.linuxquestions.org/questions/programming-9/java-using-interfaces-please-help-me-892737/)

wicked14 07-20-2011 09:22 AM

Java using interfaces please help me
 
public class Siodina{
public static void main(String a[]){
/*
* 1. Oak
* 2. Oracle
* 3. Sun Microsystems
* 4. James Gosling
*/
int prima=8;
Siodina s=new Siodina();
//blueprint of your object
boolean b=false;
blahblah();
}
private static boolean blahblah(){
return true;
}
public interface Richeve{
public void Bebedor(int chiv);
public final int age=21;
}
}

can anyone help me get the out put for this.i want to print out the value of the interface age 21.im not that familiar with OOP in java.tnx in advance

cheesus 09-19-2011 03:58 PM

copy this to a file "Siodina.java".
Compile with "javac Siodina.java".
Run with "java Siodina".

Proud 09-19-2011 05:56 PM

There is almost no OOP going on there. Also, please use [CODE] tags, and google System.out.print().


All times are GMT -5. The time now is 02:42 PM.