You are on page 1of 13

Report on Practical Industrial Training

Carried out at
National Institute of Electronics & Information Technology (NIELIT)

From 06/06/2016 to 21/07/2016.


Academic Year 2013 -2017

Submitted by: Submitted to:


Name: Babita Mr. Akhilesh Kumar Maurya
Branch & Year: Information Technology, Final Year
Univ. Roll No: 1373713012 Information Technology Department,
Rajkiya Engineering College,
Ambedkar Nagar.

U.P., India
Department of Information Technology
CERTIFICATE

This is to certify that Mr. / Ms.____________________________


___________________________________________of B. Tech.
information Technology, branch__________ Roll No. has
completed / partially completed / not completed his / her
Industrial Training during the academic year ________ from
__________to________________ at _______________________.

Head of the Department

ii

ACKNOWLEDGEMENT
The completion of this training work could have been possible with continued &
dedicated efforts & guidance of large number of faculty & staff members of the
institute .I acknowledge our gratitude to all of them. The acknowledgement
however will be incomplete without specific mention as follows

I wish to acknowledge my deep gratitude to Mr. Ghanshyam shivhare, teacher at


NIELIT for his cooperation and guidance. I am also thankful to his Lab assistant
that provided staunch support throughout this training and helped me to complete
the training successfully

Furthermore I would also like to acknowledge with much appreciation the crucial
role of our HOD Prof. Mr. Shobhit Kumar for this encouragement & providing
all the facilities in the department.
Finally, I would like to say that I am indebted to my parents for everything that
they have done for me. All of this would have been impossible without their
constant support. And I also thank to God for being kind to me and driving me
through this journey.

BABITA

iv
Abstract

Java is a programming language created by James Gosling from Sun Microsystems


(Sun) in 1991. The target of Java is to write a program once and then run this
program on multiple operating systems. The first publicly available version of Java
(Java 1.0) was released in 1995. Sun Microsystems was acquired by the Oracle
Corporation in 2010. Oracle has now the seamanship for Java. In 2006 Sun started to
make Java available under the GNU General Public License (GPL). Oracle
continues this project called Open JDK.

Over time new enhanced versions of Java have been released. The current version of
Java is Java 1.8 which is also known as Java 8.

Java is defined by a specification and consists of a programming language, a


compiler, core libraries and a runtime (Java virtual machine) The Java runtime
allows software developers to write program code in other languages than the Java
programming language which still runs on
v

Table of contents
Page no.
Cover page i
Certificate from department ii
Photo copy of the certificate iii
Acknowledgement iv
Abstract v
Table of contents vi
List of tables vii

Chapters Page no.


Chapter-1 Introduction to Java 1-9
Chapter-2 The java Program 10-15
Chapter-3 Variables and Methods 16-17
Chapter-4 Constructor and Modifiers 18-40
Chapter-5 Java to Enterprise Edition 41-49
vi

List of figures and tables

List of figures

List of Tables Page no.

History of Java (1.1)


Access Level (4.1) 22
Working with Class (4.2) 25,26,27,28
vii

Chapter-1
Introduction to Java
With the invention of microprocessors, the world is scientifically developed with
sophisticated equipments, systems, and devices. Microprocessors are used in
computers, televisions, and fax machines. Even the hand-held devices such as
pagers, PDAs (Personal Digital Assistant), and cell phones make use of
microprocessors. All these electronic devices are helpful because of their
communication capabilities. With the increasing capabilities and decreasing cost of
information processing and networking technologies, the network is growing
rapidly for transmitting information through electronic systems.

Internet is the network of networks between different types of computers


located at different places to transmit information. Information can reach to any
place in the world quickly at a cheaper rate through the Internet. Thus, the Internet
has made the world a global village for information exchange. The emerging
infrastructure of electronic devices and interconnected computer networks create
an environment that presents new challenges to software industries. for this
emerging computing environment, Java process to be a well suited programming
language. it is found suitable for networked environments involving a great variety
of computer and devices.
Java has many characteristics that have contributed to its popularity:

Platform independence - Many languages are compatible with only one


platform. Java was specifically designed so that it would run on any
computer, regardless if it was running Windows, Linux, Mac, Unix or any of
the other operating systems.

Simple and easy to use - Java's creators tried to design it so code could be
written efficiently and easily.

Multi-functional - Java can produce many applications from command-line


programs to applets to Swing windows (basically, sophisticated graphical
user interfaces). abstract "virtual machine", a generic Java
program doesn't have access to the Native API's on a system
directly. None of these issues are fatal, but it can mean that
Java isn't an appropriate choice for a particular piece of
software.

1
The Java Platform
One thing that distinguished Java from some other languages is its ability to run
the same compiled code across multiple operating systems.In other languages, the
source code (code that is written by the programmer), is compiled by a compiler
into an executable file. This file is in machine language, and is intended for a
single operating system/processor combination, so the programmer would have to
re-compile the program seperately for each new operating system/processor
combination.Java is different in that it does not compile the code directly into
machine language code. Compilation creates bytecode out of the source code.
Bytecode generally looks something like this:

a7 f4 73 5a 1b 92 7d

Java and Open Source:-

In 2006 Sun started to make Java available under the GNU General Public
License (GPL). Oracle continues this project called OpenJDK.

Java Virtual machine :-

The Java virtual machine (JVM) is a software implementation of a computer


that executes programs like a real machine.

Java programs are compiled by the Java compiler into bytecode. The Java
virtual machine interprets this bytecode and executes the Java program.

Java Runtime Environment vs. Java Development Kit


A Java distribution comes typically in two flavors, the Java Runtime
Environment (JRE) and the Java Development Kit (JDK).

The JDK contains in addition the development tools necessary to create Java
programs. The JDK consists therefore of a Java compiler, the Java virtual
machine, and the Java class libraries.
2

HISTORYOF JAVA

It is quite interesting to know the development of Java technology, which is widely


accepted in the area of networked/distributed computing. Java evolved from a
project developing a language for programming consumer electronic devices at
Sun Microsystems, USA.

Suns Stealth Project in 1990 was aimed to do research in the area of


application of computers in the consumer electronics market. Bill Joy, James
Gosling, Mike Sheridan, Patrick Naughton (formerly the project leader of Suns
Open Windows user environment), and several other individuals discussed the
ideas for the Stealth Project in January 1991.The vision of this project was to
develop smart consumer electronic devices that could all be centrally controlled
and programmed from a handheld-remote-control-like device. The Stealth group
began to work to achieve this goal. It was realized that a platform-independent
development-environment was needed.
The new language Oak was created by James Gosling, a Green Team
member, specifically for *7. Gosling named the new language Oak because that
name was struck while looking at an oak three outside of his office window. The
name Oak was later renamed to Java in order to avoid legal issues since Oak was
the name of an existing language.

When FirstPerson was bidding on the Time-Warner TV trial based on video-


on-demand technology, Time-Warner chose Silicon Graphics, Inc. (SGI) over Sun.
Hence, half of the members of FirstPerson left for SGI and the remaining
members continued to work at Sun.
Mosaic web browser revolutionized peoples perceptions. The remaining
member of FirstPerson returned to work on Java (Oak was renamed Java) to
develop Java-based web browser. FirstPerson was dissolved gradually. Naughton
and Jonathan Payne developed WebRunner (named after the movie Blade Runner).
Later WevRunner was officially announced as the HotJavaTM browser in 1994.
This was the turning point for Java. At that time the World Wide Web changed the
face of Internet and it was winning the race on Internet.

Arthur Ban Hoff implemented the Java compiler in Java itself whereas
Gosling implemented it in C. The Java compiler, written in Java made the people
to accept Java as a full-featured language.
using Java technology in interactive set-top boxes, hand-held devices and
other consumer electronics products.
Sun released the first version 1.0 of Java in 1996. Java is an object-oriented
programming language which evolved from C++. It is also a high-level
programming language. The different forms of Java versions are discussed in the
next section.

History of Java
Year Java - Versions and Features
1990 Sun Microsystems started Stealth project supporting application of
computers in the consumer electronics market.
1991 The Green project started with the members of Stealth project such
as James Gosling, Patrick Naughton, and Mike Sheridan. A new
programming language, called Oak was created by Gosling.
1992 An intelligent remote control called StarSeven was delivered. The
Green Project was incorporated was incorporated under the name
FirstPerson.
1993 Mosaic Web browser was introduced in the world of Internet.
1994 HotJava Web browser was announced by Sun Microsystems.
1995 Oak was renamed as Java. Sun officially announced Java
technology.
1996 Sun released the first version 1.0 of Java. Core Language features
supporting: I/O facility, Utilities, Network Programming, User
Interface AWT, Applets, and Multithreading.
1997 Sun released JDK1.1 by including new features such as addition of
inner classes to the language and capabilities such as JavaBeans,
JDBC(Java Data Base Connectivity), and RMI (Remote Method
Invocation).
1998 Java 2 Platform, Standard Edition (J2SE)1.2, code named as
Playground, was released. It replaced JDK and distinguished the
base platform from j2ee (Java 2 Platform, Enterprose Edition) and
J2ME (Java 2Platform, Micro Edition). The key features include
Swing graphical API, Java IDL (Interface Definition Language) to
support CORBA interoperability. They also added Collections
framework to support various data structures. For the first time,
JVM was equipped with a JIT (Just-in-Time) compiler.
2000 J2SE 1.3, code named as Kestrel, was released with key features
such as JavaSound API to support audio operations (e.g., audio
playback and capture/recording, mixing, sequencing, and
synthesis), Java Naming and Directory Interface (JNDI), and Java
Platform Debugger Architecture (JPDA).
2002 H2SE 1.4, code named as Merlin, was released with key features
such as (a) image I/O API for manipulating images in formats like
JPEG and PNG, (b) integrated XML parser and XSLT processor
(JAXP), integrated security and cryptography extensions, (c) Java
Web Start supporting deployment of Java software applications
over the network.

2004 J2SE 5.0, code named as Tiger, was released with enhancement of
Java platform and inclusion of a number of significant new
language features such as Generics, Enhanced for Loop,
Autoboxing/Unboxing, Typesafe Enums, Varags, Static Import, and
Metadata supporting declarative style programming annotation of
source code.
2006 Java SE 6.0, code named as Mustang, was released with enhancement of
performance in Swing, JDBC 4.0 support, Java Compiler API, Upgrade of
JAXB to version 2.0, including integration of a StAX parser, support for
pluggable annotations, and many GUI improvements.
2008 Java SE 7.0, code named as Dolphin, with native support for XML
recognizing its foundation for Web services.

Table:1.1

You might also like