



















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An overview of java, its features, and covers the basics of java programming. Java is a powerful, secure, high-performance, and multithreaded programming language. The java virtual machine (jvm), java classpath setting, objects and classes, and various java operators. It also discusses the structure of a java program and important concepts like static blocks and access modifiers.
Typology: Study Guides, Projects, Research
1 / 27
This page cannot be seen from the preview
Don't miss anything!
Submitted in partial fulfillment of the requirements for the award of Degree of
Training In-charge Mr. Abhinav Kumar Under the supervision of Mr. Gaurav Kumar (Senior Trainer)
(15 th^ June, 2015 – 28 th^ July, 2015)
JAYPEE INSTITUTE OF INFORMATION TECHNOLOGY, NOIDA (U.P.)
I am grateful to Hewlett Packard Enterprise India Pvt. Ltd, Gurgaon for giving me opportunity to carry out the project work in the area of console based portal designing during my training. I would like to also thank my institute, Jaypee Institute of Information Technology, Noida for giving permission and necessary administrative support to take up the training work at Hewlett Enterprise India Pvt. Ltd, Noida. Deepest thanks to our Trainer Mr. Gaurav Kumar(Senior Trainer) for his guidance, monitoring, constant encouragement and correcting various assignments of ours with attention
4.19. Super............................................................................................................................ 10
4.20. Synchronized...............................................................................................................
4.21. Abstract Classes............................................................................................................ 11 4.22. Constructors.................................................................................................................. 11 4.23. Constructors And Its Types........................................................................................... 11 4.24. (^) Static Block In Java....................................................................................................... 11 4.25. Relationship In Java...................................................................................................... 11
8.1. Inheritance................................................................................................................. 8.2. Method Overloading.................................................................................................. 8.3. Method Overriding.................................................................................................... 8.4. Interface..................................................................................................................... 8.5. Abstraction................................................................................................................ 8.6. Encapsulation............................................................................................................ 8.7. Polymorphism...........................................................................................................
9.1. Package...................................................................................................................... 9.2. Exception Handling................................................................................................... 9.3. Multithreading...........................................................................................................
9.4. String..........................................................................................................................
9.5. Collection...................................................................................................................
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.
Java divided into three categories, they are
J2SE
J2SE is used for developing client side applications.
J2EE
J2EE is used for developing server side applications.
J2ME
J2ME is used for developing mobile or wireless application by making use of a predefined protocol called WAP (wireless Access / Application protocol).
HP the largest IT company in the world, through its partner offers high quality Courses for 4 & 6 weeks. Few Courses in Summer Training Program are Programming Techniques using 'C', PHP, VLSI, VHDL & PCB Design, Data Structure using C Language, Core Java, J2EE - Hibernate with Spring Framework, J2EE - Struts with Hibernate Framework, Android, ASP.NET With C#, Embedded & Robotics-Basics & Advanced, ARM, Linux Administration with Scripting, Networking concepts with security.
Java is a platform independent, more powerful, secure, high performance, multithreaded programming language. Here we discuss some points related to 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.
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.
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.
The following sequence of steps represented in the diagram use compiling the java program and executing the java programs.
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
Object: Object is a instance of class, object has state and behaviors.An Object in java has three characteristics:
State: Represents data (value) of an object.
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.
Datatype is a spacial 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
Data Type Default Value Default size
boolean false 1 bit
char '\u0000' 2 byte
byte 0 1 byte
short 0 2 byte
int 0 4 byte
long 0L 8 byte
float 0.0f 4 byte
double 0.0d 8 byte
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.
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.
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.
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
In java language final keyword can be used in following way.
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. In java language static keyword can be used for following
this is a reference variable that refers to the current object. It is a keyword in java language represents current class object "this" keyword can be use in two ways.
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.
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.
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
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 programming undefined methods are known as un-Implemented or abstract method.The process of obtaining the data members and methods from one class to another class is known as inheritance. It is one of the fundamental features of object-oriented programming.
Types of Inheritance
Why use Inheritance?
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.
Why method Overloading?
Suppose we have to perform addition of given number but there can be any number of arguments, if we write method such as a(int, int)for two arguments, b(int, int, int) for three arguments then it is very difficult for you and other programmer to understand purpose or behaviors of method they can not identify purpose of method. So we use method overloading to easily figure out the program. For example above two methods we can write sum(int, int) and sum(int, int, int) using method overloading concept.
Different ways to overload the method
There are two ways to overload the method in java
Whenever same method name is existing in both base class and derived class with same types of parameters or same order of parameters is known as method Overriding.
Advantage of Java Method Overriding
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.
Why we use Interface?
When we use abstract and when Interface
If we do not know about any things about implementation just we have requirement specification then we should be go for Interface If we are talking about implementation but not completely (partially implemented) then we should be go for abstract