Presentation is loading. Please wait.

Presentation is loading. Please wait.

FRST JAVA PROGRAM. Getting Started with Java Programming A Simple Java Application Compiling Programs Executing Applications.

Similar presentations


Presentation on theme: "FRST JAVA PROGRAM. Getting Started with Java Programming A Simple Java Application Compiling Programs Executing Applications."— Presentation transcript:

1 FRST JAVA PROGRAM

2 Getting Started with Java Programming A Simple Java Application Compiling Programs Executing Applications

3 Java Applcation //This application program prints Welcome to java! import java.lang.*; public class Welcome { public static void main(String[]args) { System.out.println("Welcome to Java!"); }

4 RUN JAVA PROGRAM Create hello.java file To compile: – javac hello.java To run: – java hello

5

6 Bytecode (.class file)

7 Bytecode The Java compiler creates a bytecode. This is the machine independent code so; it can be executed on any machine. That is if you have created this bytecode on Windows operating system then it can be executed on Linux operating system. In order to make the Java as machine independent language, the bytecode is introduced. However, the Java Development Kit installed on different machine is different for all of them.

8 Java Virtual Machine(JVM) All the programming language compilers translate the source code into machine code. Java compiler also performs the same function. However, the difference between Java and the other compilers is that Java compiler produces the intermediate code known as bytecode for the machine that does not exist. This machine is called as Java Virtual Machine.

9 Java Virtual Machine(JVM)

10 MSBTE Question Bank: Q1. What is bytecode?Q1. What is bytecode? (s-07,s-09,s-12) Q2. What is bytecode explain JVM.Q2. What is bytecode explain JVM.(w-11,w-13) Q3. What is JVM? What is bytecode?Q3. What is JVM? What is bytecode?(s-13)


Download ppt "FRST JAVA PROGRAM. Getting Started with Java Programming A Simple Java Application Compiling Programs Executing Applications."

Similar presentations


Ads by Google