SlideShare a Scribd company logo
1 of 6
Download to read offline
JAVA ROADMAP
Java Introduction
What Is Java Programming?
Java is a widely used high-level, robust, object-oriented, secure programming
language and platform. Java was created in 1995 by Sun Microsystems (now an
Oracle company). James Gosling is regarded as the “Father of Java.” It was called
Oak before Java by Oracle. The name Oak was changed to Java by Oracle’s James
Gosling and his team because Oak was already a registered company. In this article,
we will cover the Introduction to java.
Java is an object oriented, case sensitive, class-based programming language that
is portable and platform-independent, meaning that Java code can run on any
device with a Java Virtual Machine (JVM) installed. One of Java’s key advantages is
its simplicity and adaptability. It offers straightforward syntax and a big library of
built-in functions, making it simple to build code for a wide range of applications,
including web development, mobile apps, and business software. Java is also well-
known for its reliability, security, and scalability, making it an appealing choice for
large-scale applications and projects.
It is used by a wide range of organizations, including big tech companies like Google
and Amazon, as well as banks, governments, and universities. Java is often used to
create Android mobile apps, server programs, and web applications with
frameworks like Spring and Struts. Currently, more than 3 billion devices run on
features built in Java.
History Of Java Programming Language
Java is a programming language invented by James Gosling, Mike Sheridan, and
Patrick Naughton; a team of Sun engineers known as the green team in 1991. History
of java versions starts with the first public version, Java 1.0, was released in 1996 and
could run on many devices for free. Arthur Van Hoff later rewrote the Java 1.0
compiler in Java to make it more accurate. Later, a new version of Java called Java 2
was released, with different versions for different types of devices.
Sun Microsystems addressed the ISO standards committee in 1997 and later
formalized Java, but withdrew from the process shortly thereafter. Despite its
proprietary software category, Sun used to make most of its Java implementations
available for free. Sun made money on Java by selling licenses for specialized
products like the Java Enterprise System.
He released a significant portion of its Java virtual machine as free, open-source
software on November 13, 2006. Sun completed the process on May 8, 2007, by
making all of its JVM’s core code available under open-source distribution
guidelines.
Features In Java Programming
Let’s see the various features provided by Java.
1. Object Oriented Programming (OOPs)
Object-oriented programming organizes software design and logic around objects,
classes, and data rather than procedures or functions. Object-oriented
programming means to leverage real-world techniques to develop application code
while keeping data security and integrity at the forefront of design. There are four
fundamental pillars of Object-oriented programming, and these are as follows:
1. Encapsulation: - It is a term used in Object-Oriented Programming to
denote the practice of combining data and its associated functions into a
single unit. This is similar to a real-world scenario in a firm, where separate
departments such as accounts, finance, and sales conduct specific
responsibilities and retain relevant data records.
2. Abstraction: - Abstraction means showing only the most important
information while obscuring the details. Data abstraction is the process of
presenting only essential information about data to the outer world while
obscuring the background details or implementation.
3. Polymorphism: - Polymorphism is defined as having several forms.
Polymorphism is defined as the ability of data to be displayed in more than
one form.
4. Inheritance: - In Object-Oriented Programming, Inheritance refers to the
ability of a class to acquire properties and attributes from another class. It
is a fundamental feature that plays a crucial role in designing and
implementing object-oriented systems.
2. Platform Independent in Java Programming
In Java programming, the compiler compiles source code into bytecode, which is
then executed by the Java Virtual Machine (JVM). A wide range of systems, including
Windows, Linux, and macOS, can run this bytecode generated by the compiler
because each platform has its own JVM, which generates platform-specific machine
code from the same bytecode. As a result, running the same source code on
different platforms with different JVMs produces similar results, making Java a
platform-independent language.
3. Simple
Java is developed in such a way that it is simple to understand. It is simple to master
Java if you understand the fundamentals of OOPs. Furthermore, it lacks complex
features such as operator overloading, pointers, multiple inheritances, etc.
4. Java Programming is Safe and Reliable
The fact that we don’t have access to pointers in Java makes it incredibly safe. It is
impossible for problems like buffer overflow or stack corruption to arise because we
cannot access external arrays due to the lack of pointers.
5. Robust
The Java programming language is robust, which implies it is reliable. It is designed
in such a way that it makes every attempt to find errors as early as possible, which is
why the Java compiler can detect errors that other programming languages cannot.
Garbage collection, exception handling, and memory allocation are the core aspects
of Java that make it robust.
6. High Performance
The architecture of Java is designed to minimize runtime overhead. To achieve this,
Java sometimes utilizes a Just-In-Time (JIT) compiler, which compiles code on-
demand basis. The JIT compiler only compiles those methods that are called during
runtime, which results in faster execution of the application.
7. Sandbox Execution
Java applications operate in a distinct environment that enables users to run their
programs without impacting the underlying system. This is accomplished by using a
bytecode verifier, which ensures that the code is free of errors and enhances security
by checking for any unauthorized access.
Java Programming Terminology
Let’s try to understand the various terms frequently used in Java and how the code in
Java is executed. The flow chart given below shows how a Java program is executed.
1. Java Virtual Machine (JVM)
JVM is the common name for this. Program execution is divided into three stages.
The program is written, compiled, and executed.
1. A Java programmer, such as you and I, write programs.
2. The JAVAC compiler, a primary Java compiler included in the Java
development kit (JDK), performs the compilation. It produces bytecode as
output and accepts a Java program as input.
3. A program’s JVM runs the bytecode produced by the compiler during the
Running phase.
As we have learned, the Java Virtual Machine (JVM) is responsible for running the
bytecode generated by the compiler. It is worth noting that each Operating System
has its own JVM. However, despite the differences in JVMs, the output generated by
executing the bytecode remains consistent across all platforms. This is the reason
why Java is widely regarded as a platform-independent language.
2. Bytecode in The Development Process
Bytecode is a platform-independent set of instructions that the JVM understands
and executes. When we compile any Java code, the compiler converts it into
bytecode. It is equivalent to the assembler in C++. Bytecode is an intermediary level
of instructions between the high-level language in which we write code and the low-
level machine code that the computer executes. When we write code in a high-level
language, it is compiled into bytecode. The JVM then translates the bytecode into a
low-level set of instructions.
3. Java Development Kit (JDK)
As the name implies, Java Development Kit is a full-time kit that includes a compiler,
Java Runtime Environment (JRE), Debuggers, and Java documentation. We must
have JDK installed on our computers in order to create, compile, and run the Java
program.
4. Java Runtime Environment (JRE)
The Java Development Kit (JDK) includes the Java Runtime Environment (JRE).
Installing JRE on a computer enables the execution of Java programs, but does not
provide the ability to compile them. JRE includes JVM, a browser, applet support, and
plugins that are necessary for running Java applications. As a result, having JRE
installed on a computer is required in order to run Java programs.
5. What is Java Garbage Collector in Java Programming?
In Java, the Java Virtual Machine (JVM) features a Garbage Collector that
automatically frees up memory by recollecting items that are no longer referenced
in the code. This makes life easier for programmers because they no longer have to
manage memory manually. However, programmers must still be careful about what
they write in their code and how long they use certain objects because the Garbage
Collector cannot recover memory for objects still in use. Garbage collection is a
hands-free process that happens automatically.
6. Class Path in Java Programming
The class path is a specific file path for which both the Java runtime and the Java
compiler look for .class files. However, the Java Development Kit includes a large
number of libraries by default. You can also have an external set of libraries here, but
they must first be added to the class path.
VISIT
BLOG.GEEKSTER.IN
FOR THE REMAINING
QUESTIONS

More Related Content

Similar to Java Introduction | PDF

Similar to Java Introduction | PDF (20)

Java Basic.pdf
Java Basic.pdfJava Basic.pdf
Java Basic.pdf
 
Java the reason behind its never ending demand
Java the reason behind its never ending demandJava the reason behind its never ending demand
Java the reason behind its never ending demand
 
Java Lecture 1
Java Lecture 1Java Lecture 1
Java Lecture 1
 
Java
JavaJava
Java
 
Basics of JAVA programming
Basics of JAVA programmingBasics of JAVA programming
Basics of JAVA programming
 
Java session2
Java session2Java session2
Java session2
 
JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxJAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
 
JAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptxJAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptx
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
 
Java unit 1
Java unit 1Java unit 1
Java unit 1
 
Java presentation
Java presentationJava presentation
Java presentation
 
Unit1 JAVA.pptx
Unit1 JAVA.pptxUnit1 JAVA.pptx
Unit1 JAVA.pptx
 
JAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxJAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptx
 
Core java slides
Core java slidesCore java slides
Core java slides
 
Core Java Slides
Core Java SlidesCore Java Slides
Core Java Slides
 
Java chapter 1
Java   chapter 1Java   chapter 1
Java chapter 1
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
 

More from Geekster

Constructors In Java – Unveiling Object Creation
Constructors In Java – Unveiling Object CreationConstructors In Java – Unveiling Object Creation
Constructors In Java – Unveiling Object CreationGeekster
 
Java Polymorphism: Types And Examples (Geekster)
Java Polymorphism: Types And Examples (Geekster)Java Polymorphism: Types And Examples (Geekster)
Java Polymorphism: Types And Examples (Geekster)Geekster
 
JVM Architecture – How It Works.pdf
JVM Architecture – How It Works.pdfJVM Architecture – How It Works.pdf
JVM Architecture – How It Works.pdfGeekster
 
Setting Up Java Environment | PDF
Setting Up Java Environment | PDFSetting Up Java Environment | PDF
Setting Up Java Environment | PDFGeekster
 
OOps Interview questions.pdf
OOps Interview questions.pdfOOps Interview questions.pdf
OOps Interview questions.pdfGeekster
 
2 Important Data Structure Interview Questions
2 Important Data Structure Interview Questions2 Important Data Structure Interview Questions
2 Important Data Structure Interview QuestionsGeekster
 
What are the 7 features of Python?pdf
What are the 7 features of Python?pdfWhat are the 7 features of Python?pdf
What are the 7 features of Python?pdfGeekster
 

More from Geekster (7)

Constructors In Java – Unveiling Object Creation
Constructors In Java – Unveiling Object CreationConstructors In Java – Unveiling Object Creation
Constructors In Java – Unveiling Object Creation
 
Java Polymorphism: Types And Examples (Geekster)
Java Polymorphism: Types And Examples (Geekster)Java Polymorphism: Types And Examples (Geekster)
Java Polymorphism: Types And Examples (Geekster)
 
JVM Architecture – How It Works.pdf
JVM Architecture – How It Works.pdfJVM Architecture – How It Works.pdf
JVM Architecture – How It Works.pdf
 
Setting Up Java Environment | PDF
Setting Up Java Environment | PDFSetting Up Java Environment | PDF
Setting Up Java Environment | PDF
 
OOps Interview questions.pdf
OOps Interview questions.pdfOOps Interview questions.pdf
OOps Interview questions.pdf
 
2 Important Data Structure Interview Questions
2 Important Data Structure Interview Questions2 Important Data Structure Interview Questions
2 Important Data Structure Interview Questions
 
What are the 7 features of Python?pdf
What are the 7 features of Python?pdfWhat are the 7 features of Python?pdf
What are the 7 features of Python?pdf
 

Recently uploaded

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 

Recently uploaded (20)

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 

Java Introduction | PDF

  • 1. JAVA ROADMAP Java Introduction What Is Java Programming? Java is a widely used high-level, robust, object-oriented, secure programming language and platform. Java was created in 1995 by Sun Microsystems (now an Oracle company). James Gosling is regarded as the “Father of Java.” It was called Oak before Java by Oracle. The name Oak was changed to Java by Oracle’s James Gosling and his team because Oak was already a registered company. In this article, we will cover the Introduction to java. Java is an object oriented, case sensitive, class-based programming language that is portable and platform-independent, meaning that Java code can run on any device with a Java Virtual Machine (JVM) installed. One of Java’s key advantages is its simplicity and adaptability. It offers straightforward syntax and a big library of built-in functions, making it simple to build code for a wide range of applications, including web development, mobile apps, and business software. Java is also well- known for its reliability, security, and scalability, making it an appealing choice for large-scale applications and projects. It is used by a wide range of organizations, including big tech companies like Google and Amazon, as well as banks, governments, and universities. Java is often used to create Android mobile apps, server programs, and web applications with
  • 2. frameworks like Spring and Struts. Currently, more than 3 billion devices run on features built in Java. History Of Java Programming Language Java is a programming language invented by James Gosling, Mike Sheridan, and Patrick Naughton; a team of Sun engineers known as the green team in 1991. History of java versions starts with the first public version, Java 1.0, was released in 1996 and could run on many devices for free. Arthur Van Hoff later rewrote the Java 1.0 compiler in Java to make it more accurate. Later, a new version of Java called Java 2 was released, with different versions for different types of devices. Sun Microsystems addressed the ISO standards committee in 1997 and later formalized Java, but withdrew from the process shortly thereafter. Despite its proprietary software category, Sun used to make most of its Java implementations available for free. Sun made money on Java by selling licenses for specialized products like the Java Enterprise System. He released a significant portion of its Java virtual machine as free, open-source software on November 13, 2006. Sun completed the process on May 8, 2007, by making all of its JVM’s core code available under open-source distribution guidelines. Features In Java Programming Let’s see the various features provided by Java. 1. Object Oriented Programming (OOPs) Object-oriented programming organizes software design and logic around objects, classes, and data rather than procedures or functions. Object-oriented programming means to leverage real-world techniques to develop application code while keeping data security and integrity at the forefront of design. There are four fundamental pillars of Object-oriented programming, and these are as follows: 1. Encapsulation: - It is a term used in Object-Oriented Programming to denote the practice of combining data and its associated functions into a single unit. This is similar to a real-world scenario in a firm, where separate departments such as accounts, finance, and sales conduct specific responsibilities and retain relevant data records.
  • 3. 2. Abstraction: - Abstraction means showing only the most important information while obscuring the details. Data abstraction is the process of presenting only essential information about data to the outer world while obscuring the background details or implementation. 3. Polymorphism: - Polymorphism is defined as having several forms. Polymorphism is defined as the ability of data to be displayed in more than one form. 4. Inheritance: - In Object-Oriented Programming, Inheritance refers to the ability of a class to acquire properties and attributes from another class. It is a fundamental feature that plays a crucial role in designing and implementing object-oriented systems. 2. Platform Independent in Java Programming In Java programming, the compiler compiles source code into bytecode, which is then executed by the Java Virtual Machine (JVM). A wide range of systems, including Windows, Linux, and macOS, can run this bytecode generated by the compiler because each platform has its own JVM, which generates platform-specific machine code from the same bytecode. As a result, running the same source code on different platforms with different JVMs produces similar results, making Java a platform-independent language. 3. Simple Java is developed in such a way that it is simple to understand. It is simple to master Java if you understand the fundamentals of OOPs. Furthermore, it lacks complex features such as operator overloading, pointers, multiple inheritances, etc. 4. Java Programming is Safe and Reliable The fact that we don’t have access to pointers in Java makes it incredibly safe. It is impossible for problems like buffer overflow or stack corruption to arise because we cannot access external arrays due to the lack of pointers. 5. Robust The Java programming language is robust, which implies it is reliable. It is designed in such a way that it makes every attempt to find errors as early as possible, which is why the Java compiler can detect errors that other programming languages cannot.
  • 4. Garbage collection, exception handling, and memory allocation are the core aspects of Java that make it robust. 6. High Performance The architecture of Java is designed to minimize runtime overhead. To achieve this, Java sometimes utilizes a Just-In-Time (JIT) compiler, which compiles code on- demand basis. The JIT compiler only compiles those methods that are called during runtime, which results in faster execution of the application. 7. Sandbox Execution Java applications operate in a distinct environment that enables users to run their programs without impacting the underlying system. This is accomplished by using a bytecode verifier, which ensures that the code is free of errors and enhances security by checking for any unauthorized access. Java Programming Terminology Let’s try to understand the various terms frequently used in Java and how the code in Java is executed. The flow chart given below shows how a Java program is executed. 1. Java Virtual Machine (JVM) JVM is the common name for this. Program execution is divided into three stages. The program is written, compiled, and executed.
  • 5. 1. A Java programmer, such as you and I, write programs. 2. The JAVAC compiler, a primary Java compiler included in the Java development kit (JDK), performs the compilation. It produces bytecode as output and accepts a Java program as input. 3. A program’s JVM runs the bytecode produced by the compiler during the Running phase. As we have learned, the Java Virtual Machine (JVM) is responsible for running the bytecode generated by the compiler. It is worth noting that each Operating System has its own JVM. However, despite the differences in JVMs, the output generated by executing the bytecode remains consistent across all platforms. This is the reason why Java is widely regarded as a platform-independent language. 2. Bytecode in The Development Process Bytecode is a platform-independent set of instructions that the JVM understands and executes. When we compile any Java code, the compiler converts it into bytecode. It is equivalent to the assembler in C++. Bytecode is an intermediary level of instructions between the high-level language in which we write code and the low- level machine code that the computer executes. When we write code in a high-level language, it is compiled into bytecode. The JVM then translates the bytecode into a low-level set of instructions. 3. Java Development Kit (JDK) As the name implies, Java Development Kit is a full-time kit that includes a compiler, Java Runtime Environment (JRE), Debuggers, and Java documentation. We must have JDK installed on our computers in order to create, compile, and run the Java program.
  • 6. 4. Java Runtime Environment (JRE) The Java Development Kit (JDK) includes the Java Runtime Environment (JRE). Installing JRE on a computer enables the execution of Java programs, but does not provide the ability to compile them. JRE includes JVM, a browser, applet support, and plugins that are necessary for running Java applications. As a result, having JRE installed on a computer is required in order to run Java programs. 5. What is Java Garbage Collector in Java Programming? In Java, the Java Virtual Machine (JVM) features a Garbage Collector that automatically frees up memory by recollecting items that are no longer referenced in the code. This makes life easier for programmers because they no longer have to manage memory manually. However, programmers must still be careful about what they write in their code and how long they use certain objects because the Garbage Collector cannot recover memory for objects still in use. Garbage collection is a hands-free process that happens automatically. 6. Class Path in Java Programming The class path is a specific file path for which both the Java runtime and the Java compiler look for .class files. However, the Java Development Kit includes a large number of libraries by default. You can also have an external set of libraries here, but they must first be added to the class path. VISIT BLOG.GEEKSTER.IN FOR THE REMAINING QUESTIONS