Vous êtes sur la page 1sur 9

Seminor reports On Introduction of Java

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.

Features of java programming are:1. Compiled and Interpreted

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

How java differs from c and c+ +


Java and C:

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 and C++:

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:-

it provides both information and

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>.

Java Environment:-java environment

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:-

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.

Javah:-produces header files for use with native


methods.

Javadoc:-creates HTML-format documentation


from java source code files.

Jdb:-java debugger, which helps us to find errors in our programs.

This seven applications are applied to build and run application programs this was illustrated in a below shown figure:-

Application Programming Interface


The java standard library includes hundreds of classes and methods groped into several functional packages. Most commonly used packages are:-

1. 2. 3. 4. 5. 6.

Utilities package Language support package Input/output package Networking package AWT package Applet package

Simple java program

Class welcome { Public static void main (String a[]) { System.out.println (welcome to java); } }

The first line

Class declaration
Class welcome

Declares a class, which is an object-oriented construct.

Opening brace

Every class definition in java begins with an opening brace { and ends with matching closing brace }.

The main line


The third line

Public static void main (String a[])


Defines a method named main

System.out.println (Welcome to java);

The only executable statement in the program is

The output line

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 (;).

Java program structure


Documentation section Suggested Package statement Optional Import statement Optional Interface statement Optional < -----------< -----------< -----------< ------------

Class definition Optional Main method class { Essential Main method definition }

< ------------

< ------------

Vous aimerez peut-être aussi