Java Introduction (Part I)
Java Introduction (Part I)
1
Java is both compiled and
interpreted!
2
Java Platform
• The java Virtual Machine JVM
• The Java Application Programming
Interface (API)
3
Java Program Types
• Applications: An application is a
standalone program that runs directly on
the Java platform
4
Simple Java Program
/**The HelloWorldApp class implements an
application that simply displays "Hello
World!" to the standard output. */
class HelloWorldApp {
public static void main(String args []) {
System.out.println("Hello World!");
//Display the string.
}
}
5
Your First Cup Of Java
A Checklist
6
Your First Cup Of Java
Creating Your First Application
• Create a source file: Copy the class HelloWorldApp in
your file and save it as HelloWorldApp.java
• Compile the source file into a bytecode file: to
compile your program to bytecode run the command
javac HelloWorldApp.java.
9
TroubleShooting
Exception in thread "main"
java.lang.NoClassDefFoundError: HelloWorldApp