Simple Java Program
James Gosling developed Java at Sun Microsystem, as C and C++ was not able to meet the requirements. C++ has some drawbacks that lead to the development of Java. Java provides several exciting features that make programming convenient and easier. Use class keyword to declare the class My First Program. Enclose the body of the class within curly braces. The class contains the main () method. The main() method is where an application begins executing. In java, all data and functions are declared in class. To declare a class, class keyword is used.
Internet applets are small programs that are embedded in web pages and run on the viewers’ machine in secured manner. Standalone applications is a software application that does not require low level operating system and hardware access. Execution of Java Stand Alone Applications begins from main method. If there are several classes in a program, only one class will contain main method, which is called initial class. Main method is declared as public static. There are two methods of creating and running Java program. General method and Using I-D-E like Blue-J.