Java was developed keeping world Wide web in mind.
Java was initially developed as a common language for TV-top boxes and controllers. Originally this programming language was named as Oak programming language. Java programming language was written by James Gosling along with two other persons Mike Sheridan and Patrick Naughton at Sun Microsysytems. JVM ( Java Virtual Machine) Java programs are compiled into java byte code, which is then interpreted by a special java interpreter known as Java Virtual machine. Java interpreter running on any machine appears and behaves like a virtual processor that is why the name is given as java virtual Machine. Byte Code It is an intermediate language which is produced by java compiler and converted into machine level language by Java Virtual Machine. The extension of byte code files are .class. It is a platform independent language that makes java a platform independent programming language. Java Compilation Process Java source code Java compiler JVM running on Byte Code different OS gives the Machine Level JVM Language for different OS.
MLL for MLL for MLL for
windows Linux UNIX Characteristics of java Write Once Run Anywhere(WORA) – programs written once can run anywhere without any change. Only the java interpreter changes according the platform. Light Weight Code- a big and useful application can also be created with very light code. Security – java provides many security features to make its program safe and secure. Built in Graphics- java offers many built in graphics features that make java application more visual. Object Oriented Programming Language. Supports Multimedia- supports audio, video, animations and graphics in internet environment. Platform Independent. Open Product – java is an open product, freely available to all. Types of Java Programming Stand Alone Applications – it is generally a software application that does not require low level operating system or hardware access. This includes most of the usual desktop applications such as word processor, spreadsheet etc. Every stand alone application of java starts executing with a main method. Internet Applets – these are the small programs embedded in web pages and are run in viewer’s machine by a java capable web browser. JDK ( Java Development Kit) It is a complete set of java development kit to compile and execute java programming in different platform. It contains library packages to support program development. A package is a collection of inter related classes. Blue J It is a windows based application designed to edit, compile and run java programs in windows operating system. It works with the support of JDK. It contains in-built templates( sample program) that provides assistance to new user. Comments in java programming Comment lines are used to describe the programming instructions in natural language. Java compiler ignores the comment line. Three styles of comment in java 1. //Single line comment 2. /*Multiline comment */ 3. /** documentation comment….* / Types of Errors In Programs
Syntax Error- due to the fact that the syntax of the
language is not used properly. Semantic Error – due to improper use of program statement. Logical Error- due to improper specifications. Run Time Error – due to dynamic logical and semantic error that can not be detected by the compiler.