Types of java ProgrammingStand alone• A program that is developed by the userInternet Applets• A program downloaded from the internet
Features of Java• Java is an object oriented programming language• It is both compiled and interpreted• It is platform independent• It is case sensitive• Access data from local system as well as from the net
Compiler and InterpreterSource Compiler/ Machine code Interpreter code
Byte code and JVM Windows 98 Java Java Java UnixSource Byte code Compiler Interpretercode Os2
Java Libraries• java.lang: Support classes containing String, Character, Math, Integer etc• java.io : Support classes to deal with input and output statements• java.applet: Support classes to generate applet• java.net: Support classes for network related operations• java.awt: support abstract window toolkit and manages GUI• java.txt: supports text element such as date, time and currency• java.math: Support mathematical functions
Reserved words• Otherwise called as keywords• Preserved with the system• We cannot use these reserved words as variable or constant or other identifier names.
Comments statements in java• Purpose of action being taken in different steps• There are three kinds of comments in Java.• // - Single line• /*----------*/ - Multi line• /**------*/ - Documenting comment
Output statement in java• System.out.print();• System.out.println();