Introduction of Java Report
Introduction of Java Report
INTRODUCTION TO JAVA
Java is a programming language and a platform. Java is a high level, robust, secured and
object-oriented programming language.
Java Example
class Simple {
public static void main(String args[])
{
System.out.println("Hello Java");
}
}
Where it is used: There are many devices where Java is currently used. Some of them are as
follows:
1. Desktop Applications such as acrobat reader, media player, antivirus etc.
2. Web Applications such as irctc.co.in, javatpoint.com etc.
3. Enterprise Applications such as banking applications.
4. Mobile
5. Embedded System
6. Smart Card
7. Robotics
8. Games etc.
There are mainly 4 types of applications that can be created using java programming:
1) Standalone Application
2) Web Application
An application that runs on the server side and creates dynamic page, is called web application.
Currently, Servlet, JSP, Struts, Spring, Hibernate, JSF etc. technologies are used for creating
web applications in java.
3) Enterprise Application
An application that is distributed in nature, such as banking applications etc. is called enterprise
application. It has the advantage of high level security, load balancing and clustering. In
java, EJB is used for creating enterprise applications.
4) Mobile Application
An application that is created for mobile devices. Currently Android and Java ME are used for
creating mobile applications.
It is an enterprise platform which is mainly used to develop web and enterprise applications. It
is built on the top of Java SE platform. It includes topics like Servlet, JSP, Web Services,
EJB, JPA etc.
4) JavaFx
It is used to develop rich internet applications. It uses light-weight user interface API.
HISTORY OF JAVA
The history of Java is very interesting. Java was originally designed for interactive television,
but it was too advanced technology for the digital cable television industry at the time. The
history of java starts from Green Team. Java team members (also known as Green Team),
initiated this project to develop a language for digital devices such as set-top boxes, televisions
etc. But, it was suited for internet programming. Later, Java technology was incorporated by
Netscape.
The principles for creating Java programming were "Simple, Robust, Portable, Platform-
independent, Secured, High Performance, Multithreaded, Architecture Neutral, Object-
Oriented, Interpreted and Dynamic".
Currently, Java is used in internet programming, mobile devices, games, e-business solutions
etc.
There are given the major points that describes the history of java :
1) James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language project
in June 1991. The small team of sun engineers called Green Team.
2) Originally designed for small, embedded systems in electronic appliances like set-top boxes.
3) Firstly, it was called "Greentalk" by James Gosling and file extension was .gt.
4) After that, it was called Oak and was developed as a part of the Green project.
Why Java named as "Oak": Oak is a symbol of strength and chosen as a national tree of
many countries like U.S.A., France, Germany, Romania etc. In 1995, Oak was renamed
as "Java" because it was already a trademark by Oak Technologies.
Why Java Programming named as "Java": The team gathered to choose a new name. The
suggested words were "dynamic", "revolutionary", "Silk", "jolt", "DNA" etc. They wanted
something that reflected the essence of the technology: revolutionary, dynamic, lively, cool,
unique, and easy to spell and fun to say. According to James Gosling "Java was one of the top
choices along with Silk". Since java was so unique, most of the team members preferred java.
Java is an island of Indonesia where first coffee was produced (called java coffee).
Java Version History: There are many java versions that has been released. Current stable
release of Java is Java SE 10.
FEATURES OF JAVA
The main objective of Java programming language creation was to make it portable, simple
and secure programming language. Apart from this, there are also some awesome features
which play important role in the popularity of this language. The features of Java are also
known as java buzzwords.
Simple: Java is very easy to learn and its syntax is simple, clean and easy to understand.
According to Sun, Java language is a simple programming language because:
o Java syntax is based on C++ (so easier for programmers to learn it after C++).
o Java has removed many confusing and rarely-used features e.g. explicit pointers,
operator overloading etc.
o There is no need to remove unreferenced objects because there is Automatic Garbage
Collection in java.
Platform Independent:
Java is platform independent because it is different from other languages like C, C++ etc.
which are compiled into platform specific machines while Java is a write once, run anywhere
language. A platform is the hardware or software environment in which a program runs.
Java code can be run on multiple platforms e.g. Windows, Linux, Sun Solaris, Mac/OS etc.
Java code is compiled by the compiler and converted into bytecode. This bytecode is a
platform-independent code because it can be run on multiple platforms i.e. Write Once and
Run Anywhere(WORA).
Secured: Java is best known for its security. With Java, we can develop virus-free systems.
Java is secured because:
o No explicit pointer
o Java Programs run inside virtual machine sandbox
security by separating the package for the classes of the local file system from those
that are imported from network sources.
o Bytecode Verifier: It checks the code fragments for illegal code that can violate access
right to objects.
o Security Manager: It determines what resources a class can access such as reading and
writing to the local disk.
These securities are provided by java language. Some security can also be provided by
application developer through SSL, JAAS, Cryptography etc.
Portable: Java is portable because it facilitates you to carry the java bytecode to any
platform. It doesn't require any type of implementation.
C++ VS JAVA
There are many differences and similarities between C++ programming language and Java. A
list of top differences between C++ and Java are given below:
Structure and Union C++ supports structures and Java doesn't support structures
unions. and unions.
Thread Support C++ doesn't have built-in Java has built-in thread support.
support for threads. It relies on
third-party libraries for thread
support.
Note: Java doesn't support default arguments like C++. Java does not support header files like
C++. Java uses import keyword to include different Classes and methods.
COMPONENTS OF JAVA
JVM: JVM (Java Virtual Machine) is an abstract machine. It is called virtual machine
because it doesn't physically exist. It is a specification that provides runtime environment in
which java bytecode can be executed. It can also run those programs which are written in
other languages and compiled to Java bytecode.
JVMs are available for many hardware and software platforms. JVM, JRE and JDK are
platform dependent because configuration of each OS are different from each other. But, Java
is platform independent. There are three notions of the JVM: specification, implementation,
and instance.
o Loads code
o Verifies code
o Executes code
o Provides runtime environment
JRE: JRE is an acronym for Java Runtime Environment. It is also written as Java RTE. The
Java Runtime Environment is a set of software tools which are used for developing java
applications. It is used to provide runtime environment. It is the implementation of JVM. It
physically exists. It contains set of libraries + other files that JVM uses at runtime.
Implementation of JVMs are also actively released by other companies besides Sun Micro
Systems.
JDK: JDK is an acronym for Java Development Kit. The Java Development Kit (JDK) is a
software development environment which is used to develop java applications and applets. It
physically exists. It contains JRE + development tools. JDK is an implementation of any one
of the below given Java Platforms released by Oracle corporation:
The JDK contains a private Java Virtual Machine (JVM) and a few other resources such as an
interpreter/loader (Java), a compiler (javac), an archiver (jar), a documentation generator
(Javadoc) etc. to complete the development of a Java Application.
Variable: Variable is name of reserved area allocated in memory. In other words, it is a name
of memory location. It is a combination of "vary + able" that means its value can be changed.
1) Local Variable: A variable declared inside the body of the method is called local variable.
You can use this variable only within that method and the other methods in the class aren't even
aware that the variable exists. A local variable cannot be defined with "static" keyword.
2) Instance Variable: A variable declared inside the class but outside the body of the method,
is called instance variable. It is not declared as static. It is called instance variable because its
value is instance specific and is not shared among instances.
3) Static Variable: A variable which is declared as static is called static variable. It cannot be
local. You can create a single copy of static variable and share among all the instances of the
class. Memory allocation for static variable happens only once when the class is loaded in the
memory.
class A
{
int data=50;//instance variable
static int m=100;//static variable
void method(){
int n=90;//local variable
}
}//end of class
1. Primitive data types: The primitive data types include Integer, Character, Boolean,
and Floating Point.
2. Non-primitive data types: The non-primitive data types include Classes, Interfaces,
and Arrays.
Java Primitive Data Types: In Java language, primitive data types are the building blocks of
data manipulation. These are the most basic data types available in Java language. Java is a
statically-typed programming language. It means, all variables must be declared before its use.
That is why we need to declare variable’s type and name.
There are 8 types of primitive data types: boolean data type, byte data type, char data
type,short data type, int data type, long data type, float data type, double data type
Operators in java: Operator in java is a symbol that is used to perform operations. For
example: +, -, *, / etc. There are many types of operators in java which are given below:
The popular object-oriented languages are Java, C#, PHP, Python, C++ etc.
The main aim of object oriented programming is to implement real world entities i.e. object,
classes, abstraction, inheritance, polymorphism etc.
Object means a real word entity such as pen, chair, table etc. Object-Oriented
Programming is a methodology or paradigm to design
a program using classes and objects. It simplifies the
software development and maintenance by providing
some concepts:
o Object
o Class
o Inheritance
o Polymorphism
o Abstraction
o Encapsulation
Object: Any entity that has state and behaviour is known as an object. For example: chair, pen,
table, keyboard, bike etc. It can be physical and logical.
Object can be defined as an instance of a class. An object contains an address and takes up
some space in memory. Objects can communicate without knowing details of each other's data
or code, the only necessary thing is that the type of message accepted and type of response
returned by the objects.
Example: A dog is an object because it has states i.e. colour, name, breed etc. as well as
behaviours i.e. wagging the tail, barking, eating etc.
Class: Collection of objects is called class. It is a logical entity. A class can also be defined as
a blueprint from which you can create an individual object. Class doesn’t store any space.
Another example can be to speak something e.g. cat speaks meow, dog barks woof etc.
Abstraction: Hiding internal details and showing functionality is known as abstraction. For
example: phone call, we don't know the internal processing.
Encapsulation: Binding (or wrapping) code and data together into a single unit is known as
encapsulation. For example: capsule, it is wrapped with different medicines. A java class is the
example of encapsulation. Java bean is the fully encapsulated class because all the data
members are private here.
CONSTRUCTOR IN JAVA
Every time an object is created using new () keyword, at least one constructor is called. It
is called a default constructor. It is called constructor because it constructs the values at
the time of object creation. It is not necessary to write a constructor for a class. It is
because java compiler creates a default constructor if your class doesn't have any.
Rules for creating java constructor: There are basically two rules defined for the
constructor.
Difference between constructor and method in java: There are many differences
between constructors and methods. These are:
Java Copy Constructor: There is no copy constructor in java. But, we can copy the values
of one object to another like copy constructor in C++. There are many ways to copy the
values of one object into another in java. They are:
o By constructor
o By assigning the values of one object into another
o By clone () method of Object class
Does Constructor return any value: yes, that is current class instance (You cannot
use return type yet it returns a value).
JAVA STRING
In java, string is basically an object that represents sequence of char values. An array of
characters works same as java string. For example:
1. char[] ch={'j','a','v','a','t','p','o','i','n','t'};
2. String s=new String(ch);
Java String class provides a lot of methods to perform operations on string such as compare(),
concat(), equals(), split(), length(), replace(), compareTo(), intern(), substring() etc.
The java String is immutable i.e. it cannot be changed. Whenever we change any string, a new
instance is created. For mutable string, you can use StringBuffer and StringBuilder classes.
Create String object: There are two ways to create String object:
1. By string literal
2. By new keyword
1) String Literal: Java String literal is created by using double quotes. For Example:
String s="welcome";
Each time you create a string literal, the JVM checks the string constant pool first. If
the string already exists in the pool, a reference to the pooled instance is returned. If
string doesn't exist in the pool, a new string instance is created and placed in the pool.
For example:
String s1="Welcome";
String s2="Welcome";//will not create new instance
In the above example, only one object will be created. Firstly, JVM will not find any string
object with the value "Welcome" in string constant pool, so it will create a new object. After
that it will find the string with the value "Welcome" in the pool, it will not create new object
but will return the reference to the same instance. String objects are stored in a special memory
area known as string constant pool.
We use concept of string literal in java: To make Java more memory efficient (because no
new objects are created if it exists already in string constant pool).
2) By new keyword
String s=new String("Welcome"); //creates two objects and one reference variable
In such case, JVM will create a new string object in normal (non pool) heap memory and the
literal "Welcome" will be placed in the string constant pool. The variable s will refer to the
object in heap (non pool).
Java StringBuffer class: Java StringBuffer class is used to create mutable (modifiable)
string. The StringBuffer class in java is same as String class except it is mutable i.e. it can be
changed.
Java StringBuilder class: Java StringBuilder class is used to create mutable (modifiable)
string. The Java StringBuilder class is same as StringBuffer class except that it is non-
synchronized. It is available since JDK 1.5.
Methods of both StringBuffer and StringBuilder are append(), insert(), replace(), delete(),
reverse(), capacity(), length(), charAt(int index) etc.
SPECIFICATIONS OF JAVA
Package
A package is a collection of similar types of classes, interfaces and sub-packages. Purpose of
package The purpose of package concept is to provide common classes and interfaces for any
program separately. In other words if we want to develop any class or interface which is
common for most of the java programs than such common classes and interfaces must be
place in a package.
Exception Handling
The process of converting system error messages into user friendly error message is known
as Exception handling. This is one of the powerful feature of Java to handle run time error
and maintain normal flow of java application. An Exception is an event, which occurs during
the execution of a program, that disrupts the normal flow of the program's Instructions.
Type of Exception: There are mainly two types of exceptions: checked and unchecked where
error is considered as unchecked exception. The sun microsystem says there are three types of
exceptions:
Checked Exception
Un-Checked Exception
Error
Multithreading
Multithreading in java is a process of executing multiple threads simultaneously. The aim of
multithreading is to achieve the concurrent execution.
Thread
Thread is a lightweight component and it is a flow of control. In other words, a flow of control
is known as thread.
State of a thread are classified into five types they are
1. New State
2. Ready State
3. Running State
4. Waiting State
5. Halted or dead State
Collection
Collections in java is a framework that provides an architecture to store and manipulate the
group of objects. All the operations that you perform on a data such as searching, sorting,
insertion, manipulation, deletion etc. can be performed by Java Collections. Java Collection
simply means a single unit of objects. Java Collection framework provides many interfaces
(Set, List, Queue, Deque etc.) and classes (ArrayList, Vector, LinkedList, PriorityQueue,
HashSet, LinkedHashSet, TreeSet etc)
TECHNOLOGY USED
WINDOWS 10
Windows 10 received mostly positive reviews upon its original release in July 2015; critics
praised Microsoft's decision to provide a desktop-oriented interface in line with previous
versions of Windows, contrasting the tablet-oriented approach of 8, although Windows 10's
touch-oriented user interface mode was panned for containing regressions upon the touch-
oriented interface of Windows 8.
DEVELOPMENT TOOL
1.NETBEANS IDE
MySQL is written in C and C++. Its SQL parser is written in yacc, but it uses a home brewed
lexical analyzer. MySQL works on many system platforms, including AIX, BSDi, FreeBSD,
HP-UX, eComStation, i5/OS, IRIX, Linux, macOS, Microsoft Windows, NetBSD, Novell
NetWare, OpenBSD, OpenSolaris, OS/2 Warp, QNX, Oracle Solaris, Symbian, SunOS, SCO
OpenServer, SCO UnixWare, Sanos and Tru64. A port of MySQL to OpenVMS also exists.
MySQL has received positive reviews, and reviewers noticed it "performs extremely well in
the average case" and that the "developer interfaces are there, and the documentation (not to
mention feedback in the real world via Web sites and the like) is very, very good".It has also
been tested to be a "fast, stable and true multi-user, multi-threaded sql database server".
PROJECT OVERVIEW
The "Airlines Reservation System" has been developed to override the problems prevailing in
the practicing manual system. This software is supported to eliminate and, in some cases,
reduce the hardships faced by this existing system. Moreover, this system is designed for the
particular need of the company to carry out operations in a smooth and effective manner.
The application is reduced as much as possible to avoid errors while entering the data. It also
provides error message while entering invalid data. No formal knowledge is needed for the
user to use this system. Thus, by this all it proves it is user-friendly. Airlines Reservation
System, as described above, can lead to error free, secure, reliable and fast management
system. It can assist the user to concentrate on their other activities rather to concentrate on
the record keeping. Thus, it will help organization in better utilization of resources.
Every organization, whether big or small, has challenges to overcome and managing the
information of Flights, Airlines Tickets, Customers, Vendors, Booking Counter. Every
Airlines Reservation System has different Airlines Tickets needs, therefore we design
exclusive employee management systems that are adapted to your managerial requirements.
This is designed to assist in strategic planning and will help you ensure that your organization
is equipped with the right level of information and details for your future goals. Also, for that
busy executive who are always on the go, our systems come with remote access features,
which will allow you to manage your workforce anytime, at all times. These systems will
ultimately allow you to better manage resources.
Provides the searching facilities based on various factors. Such as Airlines Tickets,
Bookings, Customers, Booking Counter
Airlines Reservation System also manage the Vendors details online for Customers details,
Booking Counter details, Airlines Tickets.
Editing, adding and updating of Records is improved which results in proper resource
management of Airlines Tickets data
It may help collecting perfect management in details. In a very short time, the collection will
be obvious, simple and sensible. It will help a person to know the management of passed year
perfectly and vividly. It also helps in current all works relative to Airlines Reservation
System. It will be also reduced the cost of collecting the management & collection procedure
will go on smoothly. Our project aims at Business process automation, i.e. we have tried to
computerize various processes of Airlines Reservation System.
In computer system the person has to fill the various forms & number of copies of the
forms can be easily generated at a time.
In computer system, it is not necessary to create the manifest but we can directly print it,
which saves our time.
To assist the staff in capturing the effort spent on their respective working areas.
The system generates types of information that can be used for various purposes.
Be easy to operate
Airlines Tickets Management Module: Used for managing the Airlines Tickets details.
Booking Counter Module: Used for managing the details of Booking Counter
Flights Management Module: Used for managing the information and details of the Flights.
Bookings Module: Used for managing the Bookings details
Accuracy in work.
Screenshots
Our project is only a humble venture to satisfy the needs to manage their project work.
Several user-friendly coding have also adopted. This package shall prove to be a powerful
package in satisfying all the requirements of the school. The objective of software planning is
to provide a frame work that enables the manger to make reasonable estimates made within a
limited time frame at the beginning of the software project and should be updated regularly as
the project progresses.
A description of the background and context of the project and its relation to work already
done in the area.
We describe the requirement Specifications of the system and the actions that can be done
on these things.
We understand the problem domain and produce a model of the system, which describes
operations that can be performed on the system.
In a nutshell, it can be summarized that the future scope of the project circles around
maintaining information regarding:
We can give more advance software for Airlines Reservation System including more
facilities
Create the master and slave database structure to reduce the overload of the database
queries
Implement the backup mechanism for taking backup of codebase and database on regular
basis on different servers
The above-mentioned points are the enhancements which can be done to increase the
applicability and usage of this project. Here we can maintain the records of Airlines Tickets
and Flights. Also, as it can be seen that now-a-days the players are versatile, i.e. so there is a
scope for introducing a method to maintain the Airlines Reservation System. Enhancements
can be done to maintain all the Airlines Tickets, Flights, Bookings, Customers, Booking
Counter.
In the last we would like to thanks all the persons involved in the development of the system
directly or indirectly. We hope that the project will serve its purpose for which it is develop
there by underlining success of process.
References
http://www.javaworld.com/javaworld/jw-01-1998/jw-01-Credentialreview.html
http://www.jdbc-tutorial.com/
https://www.tutorialspoint.com/java/
http://www.javatpoint.com/java-tutorial
https://docs.oracle.com/javase/tutorial/
http://www.wampserver.com/en/
http://www.tutorialspoint.com/mysql/