First Program in Java
public class FirstProgram {
public static void main( String [] args )
{
System.out.print (“Java Program”);
System.out.print (“My Program”);
}
}
C:\ javac FirstProgram.java
C:\java FirstProgram
Java Program My Program
public class FirstProgram {
public static void main( String [] args )
{
System.out.print (“Java Program”);
System.out.println (“My Program”);
}
}
C:\ javac FirstProgram.java
C:\java FirstProgram
Java Program
My Program
Questions for Practice :
What are the advantages of Java?
What is the difference between an interpreter and a compiler?
Define Class and Object?
What are different Java programs.
Leave a Reply