Ticker

6/recent/ticker-posts

Ad Code

Java Program Life Cycle.

To learn the steps involved in writing and executing a Java program.

Step 1 - Writing source code :-

public class Hello {
public static void main(String[] args) {       -> Saved to file
System.out.println("Hola Amigos!!");        (Hello.java)
}
}

Step 2 - Compiling source code :-

Console >> javac Hello.java

Step 3 - Executing bytecode :-

Console >> java Hello
Output >> Hola Amigos!!


After learning from the Live Demo, select all correct statements given below:

Q. No :- 10735 :-

  • Java source code is written and saved in a file with .class extension.
  • The Java compiler uses the Java source file and generates file with .class extension.
  • The file with .class extension is called as Java class file.
  • The Java class file contains the Java bytecode, which is executed by the Java Virtual Machine (JVM).



Post a Comment

0 Comments