Académique Documents
Professionnel Documents
Culture Documents
GUDIED BY:PRINCEPAL:HOD:-
Java introduction :-
java is developed by sun Microsystems laboratories at in 1999 by Janes Gosling. The inventors of java wanted to design a language which could offer solutions to some of the problems encounterd in modern programming. They wanted the language to be not only reliable, portable and distributed but also simple, compact and interactive.
2. Platform independent and portable 3. Object-oriented 4. Robust and secure 5. Distributed 6. Simple, small and familiar 7. Multithreaded and Interactive 8. High performance 9. Dynamic and Extensible 10. Ease of development 11. Desktop client
Java does not include the C unique statement keywords sizeof and typedef. Java does not contain the data types strut and
union.
Java does not support an explicit pointer type. Java does not define the type modifiers keywords auto, extern, register, signed, and
unsigned.
Java does not have a preprocessor and therefore we cannot use #define, #include, and #ifdef. Java does not support void function if in java there is any function with no arguments must be declared with empty parenthesis. Java adds new operator such as instanceof and
>>>.
Java adds labelled break and continue statements. Java adds many features required for objectoriented programming.
Java does not support operator overloading. Java does not have template classes as in C+ +.
Java does not support multiple inheritance of classes. This is accomplished using a new feature called interface. Java does not support global variables. Java does not use pointers.
Java and www :-( world wide web) www is an opened information retrieval system
designed to be used in the internets distributed environment.
Web pages:-
controls. This is made possible with the help of a language called hyper text markup language (HTML). Web pages contain HTML tags, that enable us to used in find, retrieve, manipulate and display documents world wide.
Java communicate with a web page through a special tag called <APPLET>.
includes a large number of development tools and hundreds of classes and methods. Development tools are part of the system known as java development kit (JDK). The classes and methods are part of the java standard library (JSL), also known as the application programming Interface (API).
Java development kit comes with a collection of tools that are used for development and running java programs. They include: Appletviewer:-enables us to run java applets (without actually using a java-compatible browser). Javac:-the java compiler, which translates java sourcecode to bytecode files that the interpreter can understand. Java:-java interpreter, which runs applet and applications by reading and interpreting bytecode files. Javap:-java disassembler, which enables us to convert bytecode files into a program description.
This seven applications are applied to build and run application programs this was illustrated in a below shown figure:-
1. 2. 3. 4. 5. 6.
Utilities package Language support package Input/output package Networking package AWT package Applet package
Class welcome { Public static void main (String a[]) { System.out.println (welcome to java); } }
Class declaration
Class welcome
Opening brace
Every class definition in java begins with an opening brace { and ends with matching closing brace }.
The println method is a member of the out object, which is a static data member of system class. This line prints the string:-
Welcome to java
Println always appends a new line character to end of the string. This means the subsequent output will start on a new line. It was always ends with a semicolon (;).
Class definition Optional Main method class { Essential Main method definition }
< ------------
< ------------