JAVA NOTES
INDEX
[1]
,1. Introduction............................................................................................................................3
2. Basics Of Java..........................................................................................................................4
2.1. Overview Of Java...........................................................................................................4
2.2. Features Of Java.............................................................................................................5
2.3. Java ClassPath Setting....................................................................................................7
2.4. Steps For Compiling And Executing Programs..............................................................9
2.5. Difference Between JDK,JRE And JVM.…….………………………………………11
2.6. Object & Class..............................................................................................................12
2.7. Variables..................................................................................................................... 12
3. Programming Concepts...................................................................................................... 14
3.1. Structure Of Java Program.............................................................................................15
3.2. Main Method..................................................................................................................15
3.3. Decision Making Statement...........................................................................................16
3.4. Looping Statement.........................................................................................................17
3.5. Wrapper Classes.............................................................................................................18
3.6. Access Modifiers............................................................................................................19
4. Java Useful Keywords.......................................................................................................... 20
4.1. Final................................................................................................................................20
4.2. Static...............................................................................................................................20
4.3. This..................................................................................................................................20
4.4. Super...............................................................................................................................21
4.5. Synchronized..................................................................................................................21
5. Java Classes,Blocks & Constructors...................................................................................21
5.1. Abstract Classes.............................................................................................................21
5.2. Constructors...................................................................................................................22
5.3. Constructors & Its Types.............................................................................................. 23
5.4. Static Block InJava........................................................................................................24
5.5. Relationship In Java.......................................................................................................24
6. Java Object Oriented...........................................................................................................26
6.1. Inheritance..................................................................................................................... 26
6.2. Method Overloading......................................................................................................28
6.3. Method Overriding........................................................................................................28
6.4. Interface........................................................................................................................ 29
6.5. Abstraction................................................................................................................... 30
6.6. Encapsulation.............................................................................................................. 31
6.7. Polymorphism................................................................................................................32
[2]
,7. Java Advanced.................................................................................................................... 33
7.1. Package........................................................................................................................33
7.2. Exception Handling.....................................................................................................33
7.3. Multithreading.............................................................................................................34
7.4. String...........................................................................................................................36
8. Eclipse IDE.......................................................................................................................... 37
9. Java Project..........................................................................................................................40
10. Conclusions...........................................................................................................................47
[3]
, 1. Introduction
Java is a high-level, class-based, object-oriented programming language that is designed to have
as few implementation dependencies as possible. It is a general-purpose programming language
intended to let programmers write once, run anywhere (WORA), meaning that compiled Java
code can run on all platforms that support Java without the need to recompile.[18] Java
applications are typically compiled to byte code that can run on any Java virtual machine (JVM)
regardless of the underlying computer architecture. The syntax of Java is similar to C and C++,
but has fewer low-level facilities than either of them. The Java runtime provides dynamic
capabilities (such as reflection and runtime code modification) that are typically not available in
traditional compiled languages. As of 2019, Java was one of the most popular programming
languages in use according to Git Hub particularly for client–server, with a reported 9 million
developers.
Java was originally developed by James Gosling at Sun Microsystems. It was released in May
1995 as a core component of Sun Microsystems' Java platform. The original and reference
implementation Java of compilers, virtual machines, and class libraries were originally released
by Sun under proprietary licenses. As of May 2007, in compliance with the specifications of
the Java Community Process, Sun had relicensed most of its Java technologies under the GPL-
2.0-only license. Oracle offers its own Hot Spot Java Virtual Machine, however the
official reference implementation is the Open JDK JVM which is free open-source software and
use by most developers and is the default JVM for almost all Linux distributions.
As of September 2022, Java 19 is the latest version, while Java 17, 11, and 8 are the
current long-term support (LTS) versions.
[3]
INDEX
[1]
,1. Introduction............................................................................................................................3
2. Basics Of Java..........................................................................................................................4
2.1. Overview Of Java...........................................................................................................4
2.2. Features Of Java.............................................................................................................5
2.3. Java ClassPath Setting....................................................................................................7
2.4. Steps For Compiling And Executing Programs..............................................................9
2.5. Difference Between JDK,JRE And JVM.…….………………………………………11
2.6. Object & Class..............................................................................................................12
2.7. Variables..................................................................................................................... 12
3. Programming Concepts...................................................................................................... 14
3.1. Structure Of Java Program.............................................................................................15
3.2. Main Method..................................................................................................................15
3.3. Decision Making Statement...........................................................................................16
3.4. Looping Statement.........................................................................................................17
3.5. Wrapper Classes.............................................................................................................18
3.6. Access Modifiers............................................................................................................19
4. Java Useful Keywords.......................................................................................................... 20
4.1. Final................................................................................................................................20
4.2. Static...............................................................................................................................20
4.3. This..................................................................................................................................20
4.4. Super...............................................................................................................................21
4.5. Synchronized..................................................................................................................21
5. Java Classes,Blocks & Constructors...................................................................................21
5.1. Abstract Classes.............................................................................................................21
5.2. Constructors...................................................................................................................22
5.3. Constructors & Its Types.............................................................................................. 23
5.4. Static Block InJava........................................................................................................24
5.5. Relationship In Java.......................................................................................................24
6. Java Object Oriented...........................................................................................................26
6.1. Inheritance..................................................................................................................... 26
6.2. Method Overloading......................................................................................................28
6.3. Method Overriding........................................................................................................28
6.4. Interface........................................................................................................................ 29
6.5. Abstraction................................................................................................................... 30
6.6. Encapsulation.............................................................................................................. 31
6.7. Polymorphism................................................................................................................32
[2]
,7. Java Advanced.................................................................................................................... 33
7.1. Package........................................................................................................................33
7.2. Exception Handling.....................................................................................................33
7.3. Multithreading.............................................................................................................34
7.4. String...........................................................................................................................36
8. Eclipse IDE.......................................................................................................................... 37
9. Java Project..........................................................................................................................40
10. Conclusions...........................................................................................................................47
[3]
, 1. Introduction
Java is a high-level, class-based, object-oriented programming language that is designed to have
as few implementation dependencies as possible. It is a general-purpose programming language
intended to let programmers write once, run anywhere (WORA), meaning that compiled Java
code can run on all platforms that support Java without the need to recompile.[18] Java
applications are typically compiled to byte code that can run on any Java virtual machine (JVM)
regardless of the underlying computer architecture. The syntax of Java is similar to C and C++,
but has fewer low-level facilities than either of them. The Java runtime provides dynamic
capabilities (such as reflection and runtime code modification) that are typically not available in
traditional compiled languages. As of 2019, Java was one of the most popular programming
languages in use according to Git Hub particularly for client–server, with a reported 9 million
developers.
Java was originally developed by James Gosling at Sun Microsystems. It was released in May
1995 as a core component of Sun Microsystems' Java platform. The original and reference
implementation Java of compilers, virtual machines, and class libraries were originally released
by Sun under proprietary licenses. As of May 2007, in compliance with the specifications of
the Java Community Process, Sun had relicensed most of its Java technologies under the GPL-
2.0-only license. Oracle offers its own Hot Spot Java Virtual Machine, however the
official reference implementation is the Open JDK JVM which is free open-source software and
use by most developers and is the default JVM for almost all Linux distributions.
As of September 2022, Java 19 is the latest version, while Java 17, 11, and 8 are the
current long-term support (LTS) versions.
[3]