PTS Final
PTS Final
JAVA TECHNOLOGY
Submitted
in partial fulfilment for the award of the Degree of
Bachelor of Technology
In
Computer Engineering
1
ARYA INSTITUTE OF ENGINEERING & TECHNOLOGY
SP-40, RIICO Industrial Area, Jaipur (Raj)-302022
Certificate
This is to certify that the work, which is being presented in the Practical
training seminar report for practical training taken at TOPS
TECHNOLOGIES, AHMEDABAD entitled JAVA TECHNOLOGY submitted
by Mr. Rishabh Jain, a student of fourth year(VIISem)B.Tech. in
Computer Engineering as a partial fulfilment for the award of degree of
bachelor of technology is a record of student’s work carried out and
found satisfactory for submission.
2
Candidate’s Declaration
I hereby declare that the work, which is being presented in the practical
training seminar, entitled “Java Technology ”in partial fulfillment for the award
of Degree of “Bachelor of Technology” in Department of Computer Science
&Engineering with Specialization in Computer Engineering, and submitted to
the Department of Computer Science & Engineering, Arya Institute of
Engineering & Technology, is a record of my own investigations carried under
the Guidance of Mr. Manish Choubisa, Associate Professor, Department of
Computer Science & Engineering.
(Signature of Candidate)
Rishabh Jain
Roll No.: 16EAICS136
3
Certificate
4
Acknowledgment
We would like to first of all express our thanks to Dr. Puja Agrawal, Managing
Director, Arya Group of Colleges, for providing us such a great infrastructure
and environment for our overall development.
Words are inadequate in offering our thanks to Mr. Sayar Singh Shekhawat,
H.O.D. of CSE Department, for consistent encouragement and support for
shaping our Seminar in the presentable form.
We also like to express our thanks to all CSE faculty members who have been a
constant source of encouragement for successful completion of this project.
Also, our warm thanks to Arya Institute of Engineering and Technology, who
provided us this opportunity to carryout and enhance our learning in various
technical fields.
5
ABSTRACT
Java Technology is both a programming language and a platform. With most programming
languages, you either compile or interpret a program so that you can run it on your computer.
The java programming language is unusual in that a program is both compiled and
interpreted. With the compiler, first you translate a program into an intermediate language
called Java Bytecodes -the platform- independent codes interpreted by the interpreter on the
Java platform. The interpreter parses and runs each Java bytecode instruction on the
computer.
Compilation happens just once; interpretation occurs each time the program is executed.
You can think of Java bytecodes as the machine code instructions for the Java Virtual
Machine. Every Java interpreter, whether it’s a development tool or a web browser that can
run applets, is an implementation of the Java VM.
On November 13,2006, Sun Microsystems made the bulk of its implementation of Java
available under the GNU General Public License.
The latest versions are Java 13, released in October 2019, and Java 11, a currently supported
long-term support(LTS) version, released on September 25,2018.
Some Java applications are in fairly widespread desktop use, including the NetBeans and
Eclipse integrated development environments, and file sharing clients such as LimeWare and
Vuze. Oracle plans to first deprecate the separately installable Java browser plugin from the
Java Runtime Environment in JDK 9 then remove it completely from a future release, forcing
web developers to use an alternative technology.
6
CONTENT
Main Page
Certificate (College) (1)
Certificate (Company) (2)
Candidate’s Declaration (3)
Acknowledgment (4)
Abstract (5)
Table of Content (6)
7
Chapter Chapter Name Page No.
No.
1 Introduction 12
1.1 About Company 12
1.2 Practical Training 13
2 Literature Survey 14
2.1 What is Java Technology? 14
2.1.1 Basics of Java 15
2.1.2 Overview of Java 15
2.1.3 Features of Java 16
2.1.4 Java ClassPath Setting 16
2.1.5 Steps for Compiling and Executing Programs 17
2.1.6 Difference Between JDK,JRE and JVM 18
2.1.7 Object and Class 19
2.1.8 Data Types 20
2.1.9 Variables 21
2.1.10 Operators and Its Types 21
3 Programming Concepts 22
8
3.7 Java Useful Keywords 25
3.7.1 Final 25
3.7.2 Static 26
3.7.3 This 26
3.7.4 Super 27
3.7.5 Synchronized 27
4.1 Inheritance 29
4.2 Method Overloading 30
4.3 Method Overriding 30
4.4 Interface 31
4.5 Abstraction 32
4.6 Encapsulation 32
4.7 Polymorphism 32
4.8.1 Package 33
4.8.2 Exception Handling 33
4.8.3 Multithreading 34
4.8.4 String 34
4.8.5 Collection 35
5 Project 36
Project snippets 37
Conclusion
46
References
47
9
LIST OF ABBREVIATIONS
7. FB Facebook
15. DB Database
10
LIST OF FIGURES
LIST OF TABLES
11
CHAPTER 1
INTRODUCTION
ABOUT COMPANY
TOPS Technologies is one of the largest IT Training and Finishing Schools with
expertise in ASP.Net Training, PHP Training, Java Training, iPhone Training, Android Training,
Software Testing Training, SEO Training, Web Design Training. We started the training division to
become a bridge between the skills required by the best IT companies require and the talent created by
Engineering, BCA, MCA colleges. As an IT Finishing school, we are one of the largest and Best
placement generator in the Software Development sector placing over 1000 students at various IT
companies across Gujarat and India. As one of the largest Software Development company in Gujarat,
we have also been accorded the Microsoft Silver Learning Partnership by Microsoft Corporation.
12
ABOUT INDUSTRIAL TRAINING
TOPS Technologies is one of the largest IT Training and Finishing Schools with expertise in ASP.Net
Training, PHP Training, Java Training, iPhone Training, Android Training, Software Testing Training,
SEO Training, Web Design Training. We started the training division to become a bridge between the
skills required by the best IT companies require and the talent created by Engineering, BCA, MCA
colleges. As an IT Finishing school, we are one of the largest and Best placement generator in the
Software Development sector placing over 1000 students at various IT companies across Gujarat and
India. As one of the largest Software Development company in Gujarat, we have also been accorded
the Microsoft Silver Learning Partnership by Microsoft Corporation.
Industrial training gives you a great experience during your Bachelor/Master degree
including:
Increase their technical, interpersonal and communication skills, both oral and written
13
ABOUT JAVA TECHNOLOGY
Java is one of the programming language or technology used for developing web
applications. Java language developed at SUN Micro Systems in the year 1995 under the
guidance of James Gosling and there team. Originally SUN Micro Systems is one of the
Academic university (Standford University Network).
Whatever the software developed in the year 1990, SUN Micro Systems has released on the
name of oak, which is original name of java (scientifically oak is one of the tree name). The
OAK has taken 18 months to develop.The oak is unable to fulfill all requirements of the
industry. So James Gosling again reviews this oak and released with the name of java in the
year 1995. Scientifically java is one of the coffee seed name.
J2SE
J2EE
J2ME
J2ME is used for developing mobile or wireless application by making use of a predefined
protocol called WAP (wireless Access / Application protocol).
14
CHAPTER 2
BASICS OF JAVA
Overview Of Java
Define JRE
The Java Runtime Environment (JRE) is part of the Java Development Kit (JDK). It contains
set of libraries and tools for developing java application. The Java Runtime Environment
provides the minimum requirements for executing a Java application.
Define JVM
JVM is set of programs developed by sun Micro System and supplied as a part of jdk for reading
line by line of byte code and it converts into native understanding form of operating system. Java
language is one of the compiled and interpreted programming language.
Garbage Collector
Garbage Collector is the system Java program which runs in the background along with
regular Java program to collect un-Referenced (unused) memory space for improving the
performance of our applications.
15
Features Of JAVA
Features of a language are nothing but the set of services or facilities provided by the language
vendors to the industry programmers. Some important features are;
Path Variable
Path variable is set for providing path for all java tools like java, javac, javap, javah, jar,
appletviewer which are use in java programming. These all tools are available in bin folders so
we set path upto bin folders.
16
Classpath Variable
Classpath variable is set for providing path for predefined java classes which is used in our
application. All classes are available in lib/rt.jar so we set classpath upto lib/rt.jar.
17
Difference Between JDK, JRE AND JVM
Jvm, Jre, Jdk these all the backbone of java language. Each components have separate works.
Jdk and Jre physically exists but Jvm are abstract machine it means it not physically exists.
JVM : JVM (Java Virtual Machine) is a software. It is a specification that provides runtime
environment in which java bytecode can be executed. It not physically exists.JVMs are not same
for all hardware and software, for example for window os JVM is different and for Linux VJM is
different. JVM, JRE and JDK are platform dependent because configuration of each OS differs.
But, Java is platform independent.
JRE : The Java Runtime Environment (JRE) is part of the Java Development Kit (JDK). It
contains set of libraries and tools for developing java application. The Java Runtime Environment
provides the minimum requirements for executing a Java application. It physically exists. It
contains set of libraries + other files that JVM uses at runtime.
JDK : The Java Development Kit (JDK) is primary components. It physically exists. It is
collection of programming tools and JRE, JVM.
18
Object And Class
Object is the physical as well as logical entity where as class is the only logical entity.Class:
Class is a blue print which is containing only list of variables and method and no memory is
allocated for them. A class is a group of objects that has common properties.
Data Member
Method
Constructor
Block
Object: Object is a instance of class, object has state and behaviors.An Object in java has three
characteristics:
State
Behavior
Identity
Behavior: Represents the behavior (functionality) of an object such as deposit, withdraw etc.
Identity: Object identity is typically implemented via a unique ID. The value of the ID is not
visible to the external user. But,it is used internally by the JVM to identify each object uniquely.
Class is also can be used to achieve user defined data types.
19
Data Types
Datatype is a special keyword used to allocate sufficient memory space for the data, in other
words Data type is used for representing the data in main memory (RAM) of the computer.
In general every programming language is containing three categories of data types. They are
byte 0 1 byte
short 0 2 byte
int 0 4 byte
long 0L 8 byte
20
Variable
Variable is an identifier which holds data or another one variable is an identifier whose value
can be changed at the execution time of program. Variable is an identifier which can be used
to identify input data in a program.
Operator is a special symbol that tells the compiler to perform specific mathematical or
logical Operation. Java supports following lists of operators.
Arithmetic Operators
Relational Operators
Logical Operators
Bitwise Operators
Assignment Operators
21
CHAPTER 3
PROGRAMMING CONCEPTS
Structure of a java program is the standard format released by Language developer to the
Industry programmer. Sun Micro System has prescribed the following structure for the java
programmers for developing java application.
22
A package is a collection of classes, interfaces and sub-packages. A sub package contains
collection of classes, interfaces and sub-sub packages etc. java.lang.*; package is
imported by default and this package is known as default package.
Class is keyword used for developing user defined data type and every java program
Main( ) Method
main() method is starting execution block of a java program or any java program start their
execution from main method. If any class contain main() method known as main class.
23
Decision Making Statement
Decision making statement statements is also called selection statement. That is depending
on the condition block need to be executed or not which is decided by condition. If the
condition is "true" statement block will be executed, if condition is "false" then statement
block will not be executed. In java there are three types of decision making statement.
if
if-else
switch
Looping Statement
for loop
while loop
do..while loop
Wrapper Classes
For each and every fundamental data type there exist a pre-defined class, Such predefined
class is known as wrapper class. The purpose of wrapper class is to convert numeric string
data into numerical or fundamental data.
24
Access modifiers:
Access modifiers are those which are applied before data members or methods of a class.
These are used to where to access and where not to access the data members or methods. In
java programming we have four access modifiers they are
Final keyword
25
Static keyword
The static keyword is used in java mainly for memory management. Static keyword are used
with variables, methods, blocks and nested class. Static is a keyword that are used for share
the same variable or method of a given class. This is used for a constant variable or a method
that is the same for every instance of a class. The main method of a class is generally labeled
static.
3. block
4. nested class
This keyword
this is a reference variable that refers to the current object. It is a keyword in java
26
Super keyword
Super keyword in java is a reference variable that is used to refer parent class object.
Super is an implicit keyword create by JVM and supply each and every java program for
performing important role in three places.
At variable level
At method level
At constructor level
Synchronized Keyword
Synchronized Keyword is used for when we want to allow only one thread at a time then
use Synchronized modifier. If a method or block declared as a Synchronized then at a
time only one thread is allowed to operate on the given object.
Abstract Classes
We know that every java program must start with a concept of class that is without classes
concept there is no java program perfect. In java programming we have two types of classes
they are
1. Concrete class
2. Abstract class
27
Constructor And Its Types
A constructor is a special member method which will be called implicitly (automatically) by
the JVM whenever an object is created for placing user or programmer defined values in
place of default values. In a single word constructor is a special member method which will
be called automatically whenever object is created.
Types of constructors
Based on creating objects in Java constructor are classified in two types. They are
Static block is a set of statements, which will be executed by the JVM before execution of
main method. At the time of class loading if we want to perform any activity we have to
define that activity inside static block because static block execute at the time of class
loading.
In a class we can take any number of static block but all these static block will be execute
Relationship in Java
Type of relationship always makes to understand how to reuse the feature from one class to
another class. In java programming we have two types of relationship they are.
Is-A Relationship
Has-A Relationship
28
CHAPTER 4
JAVA OBJECT ORIENTED
Inheritance
The process of obtaining the data members and methods from one class to another class is
programming.
A class that is declared with abstract keyword, is known as abstract class. An abstract
class is one which is containing some defined method and some undefined method. In java
process of obtaining the data members and methods from one class to another class is
programming.
Types of Inheritance
Single inheritance
Multiple inheritance
Hierarchical inheritance
Multilevel inheritance
Hybrid inheritance
29
Why use Inheritance ?
For Method Overriding (used for Runtime Polymorphism).
It's main uses are to enable polymorphism and to be able to reuse code for
different classes by putting it in a common super class
Method Overloading
Whenever same method name is exiting multiple times in the same class with different
number of parameter or different order of parameters or different types of parameters is
known as method overloading.
Method Overriding
Whenever same method name is existing in both base class and derived class with same
30
Advantage of Java Method Overriding
Interface
Interface is similar to class which is collection of public static final variables (constants) and
abstract methods.The interface is a mechanism to achieve fully abstraction in java. There can
be only abstract methods in the interface. It is used to achieve fully abstraction and multiple
inheritance in Java.
31
Abstraction
Abstraction is the concept of exposing only the required essential characteristics and
Hiding of data is known as data abstraction. In object oriented programming language this
is implemented automatically while writing the code in the form of class and object.
Encapsulation
Encapsulation is a process of wrapping of data and methods in a single unit is called
encapsulation. Encapsulation is achieved in java language by class concept.Combining of
state and behavior in a single container is known as encapsulation. In java language
encapsulation can be achieve using class keyword, state represents declaration of variables
on attributes and behavior represents operations in terms of method.
Benefits of encapsulation
Polymorphism
The process of representing one form in multiple forms is known as Polymorphism.Here
original form or original method always resides in base class and multiple forms represents
overridden method which resides in derived classes.
Polymorphism is not a programming concept but it is one of the principal of OOPs. For
many objects oriented programming language polymorphism principle is common but whose
implementations are varying from one objects oriented programming language to another
object oriented programming language.
32
Polymorphism principal is divided into two sub principal they are:
JAVAADVANCED
Package
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
33
Multithreading
Thread
Thread is a lightweight components 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
String
String is a sequence of characters enclosed within double quotes (" ") is known as String.
Example: "Java Programming".
In java programming to store the character data we have a fundamental datatype called
char. Similarly to store the string data and to perform various operation on String data, we
have three predefined classes they are:
String
StringBuffer
StringBuilder
34
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 (Array List, Vector, LinkedList, Priority Queue,
HashSet, Linked Hash Set, Tree Set etc)
35
PROJECTS UNDERTAKEN
Now a days online service is a best competitive edge for any organization which makes
it differ from other organizations .
The Gym Management System is such a system which provide best platform for ease of
access to the Gym Staff. Customer can check his updates online anytime about fitness or
diet plan etc.
The focus of this project is about online services for a fitness club but by minimizing all
those defects which are found in currently available manually file system.
This is a best platform for customers and gym staff to interact freely with each other.
In this System admin of the system and customer’s have their accounts (user-name and passwords).
This system will be used by only two person’s (admin and customer’s). Admin can
update everything, customers can only view the daily updates about their fitness updates
and can edit his profile data and post a question to admin.
36
Project Snippets
HOME PAGE
37
ADMIN LOGIN
38
ADMIN INTERFACE
39
USER REGISTRATION
40
USER LOGIN
41
PROJECT CODE
42
43
44
45
CONCLUSIONS
Practical knowledge means the visualization of the knowledge, which we read in our books.
For this, we perform experiments and get observations. Practical knowledge is very important
in every field. One must be familiar with the problems related to that field so that he may
solve them and become a successful person.
After achieving the proper goal in life, an engineer has to enter in professional life. According
to this life, he has to serve an industry, may be public or private sector or self-own. For the
efficient work in the field, he must be well aware of the practical knowledge as well as
theoretical knowledge.
Due to all above reasons and to bridge the gap between theory and practical our Engineering
and Training curriculum provides a practical training of 45 days. During this period a student
work in the industry and get all type of experience and knowledge about the working of
companies and hardware and software tools.
46
REFERENCES
Google Group-javatechzone
47