Download presentation
Presentation is loading. Please wait.
Published byLoreen Montgomery Modified over 9 years ago
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
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)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.