SlideShare a Scribd company logo
PRESENTED BY:
Ashis
 Java is a popular high level, robust, object-
oriented and secure and platform
independent programming language
developed by Sun Microsystems (which is now
the subsidiary of Oracle) in the early 1990s.
 Most of the java syntax has derived from
C/C++.
 Sun released first JDK 1.0 in 1995.
 Java works on different platforms (Windows, Mac,
Linux, Raspberry Pi, etc.)
 Platform: Any hardware or software environment in
which a program runs, is known as a platform.
Since Java has a runtime environment (JRE) and
API(Application Programming Interface), it is called
a platform.
 One of the most popular programming language in
the world and has a large demand in the current
job market
 It is easy to learn, simple to use, secure, fast and
powerful
 It is open-source and free
 In 1991,James Gosling (father of Java), Patrick Naughton
and Mike Sheridan (Green Team) first invented a new
technology for convergence of digitally-controlled
consumer devices and computers named as “The Green
Project”.
 Firstly, Java was called "Greentalk" by James Gosling, and
the file extension was .gt. Initially it was designed for
small, embedded systems in electronic appliances like set-
top boxes.
 Gosling created a new language named “Oak” to develop
the graphics system of the controller and animated touch
screen user interface.
◦ Oak is a symbol of strength and chosen as a national tree of many
countries like the U.S.A., France, Germany, Romania, etc.
 In 1995, Oak was renamed as "Java" because it was already
a trademark by Oak Technologies.
 Desktop Applications such as acrobat reader,
media player, antivirus, etc.
 Web Applications (Web servers and application
servers) such as irctc.co.in, javatpoint.com, etc.
 Enterprise Applications such as banking
applications.
 Mobile applications (specially Android apps).
 Embedded System
 Database connection
 Smart Card
 Robotics
 Games, etc.
1. Standalone Application
◦ Also known as desktop applications / window-based
applications. These are traditional software that we need to
install on every machine.
◦ Examples: Media player, antivirus, etc. AWT and Swing are
used in Java for creating standalone applications.
2. Web Application
◦ An application that runs on the server side and creates a
dynamic page is called a web application. Following
technologies are used for creating web applications in Java.
 Servlet
 JSP
 Struts
 Spring
 Hibernate
 JSF
3. Enterprise Application
◦ An application that is distributed in nature, such as
banking applications, etc. is called an enterprise
application. It has advantages like high-level
security, load balancing, and clustering.
◦ In Java, EJB is used for creating enterprise
applications.
4. Mobile Application
◦ An application which is created for mobile devices
is called a mobile application.
◦ Currently, Android and Java ME are used for
creating mobile applications.
 Many java versions have been released till now. The current stable release of Java
is Java SE 10.
◦ JDK Alpha and Beta (1995)
◦ JDK 1.0 (23rd Jan 1996)
◦ JDK 1.1 (19th Feb 1997)
◦ J2SE 1.2 (8th Dec 1998)
◦ J2SE 1.3 (8th May 2000)
◦ J2SE 1.4 (6th Feb 2002)
◦ J2SE 5.0 (30th Sep 2004)
◦ Java SE 6 (11th Dec 2006)
◦ Java SE 7 (28th July 2011)
◦ Java SE 8 (18th Mar 2014)
◦ Java SE 9 (21st Sep 2017)
◦ Java SE 10 (20th Mar 2018)
◦ Java SE 11 (September 2018)
◦ Java SE 12 (March 2019)
◦ Java SE 13 (September 2019)
◦ Java SE 14 (Mar 2020)
◦ Java SE 15 (September 2020)
◦ Java SE 16 (Mar 2021)
◦ Java SE 17 (September 2021)
◦ Java SE 18 (to be released by March 2022)
There are 4 platforms or editions of Java Technology:
 Java SE (Java Standard Edition)
◦ It is a Java programming platform. It includes Java programming
APIs such as java.lang, java.io, java.net, java.util, java.sql,
java.math etc.
◦ It includes core topics like OOPs, String, Regex, Exception, Inner
classes, Multithreading, I/O Stream, Networking, AWT, Swing,
Reflection, Collection, etc.
 Java EE (Java Enterprise Edition)
◦ It is an enterprise platform that is mainly used to develop web and
enterprise applications. It is built on top of the Java SE platform.
◦ It includes topics like Servlet, JSP, Web Services, EJB, JPA etc.
 Java ME (Java Micro Edition)
◦ It is a micro platform that is dedicated to mobile applications.
 Java FX
◦ It is used to develop rich internet applications. It uses a
lightweight user interface API.
 We can write Java code in a text editor or in
an Integrated Development Environment,
such as IntelliJ IDEA, Netbeans or Eclipse,
Platform-independent C++ is platform-dependent. Java is platform-independent.
Mainly used for System programming.
Application programming. Used in Windows-
based, web-based, enterprise, and mobile
applications.
Design Goal
Designed for systems and applications
programming. It was an extension of the C
programming language.
Designed and created as an interpreter for printing
systems but later extended as a support network
computing
Goto Supports the goto statement. Doesn't support the goto statement.
Multiple inheritance Supports multiple inheritance.
Doesn't support multiple inheritance through class.
It can be achieved by using interfaces in java.
Operator Overloading Supports operator overloading. Doesn't support operator overloading.
Pointers
Supports pointers. You can write a pointer
program in C++.
Java supports pointer internally. However, you
can't write the pointer program in java.
Compiler and Interpreter
Uses compiler only. C++ is compiled and run
using the compiler which converts source code
into machine code so, C++ is platform dependent.
Uses both compiler and interpreter. Java source
code is converted into bytecode at compilation
time. The interpreter executes this bytecode at
runtime and produces output. Java is interpreted
that is why it is platform-independent.
Call by Value and Call by reference Supports both call by value and call by reference. Supports call by value not call by reference.
Comparison Index C++ Java
Structure and Union C++ supports structures and unions. Java doesn't support structures and unions.
Thread Support
C++ doesn't have built-in support for threads. It
relies on third-party libraries for thread support.
Java has built-in thread support.
Documentation comment C++ doesn't support documentation comments.
Java supports documentation comment (/** ... */) to
create documentation for java source code.
Virtual Keyword
C++ supports virtual keyword so that we can decide
whether or not to override a function.
Java has no virtual keyword. We can override all
non-static methods by default. In other words, non-
static methods are virtual by default.
unsigned right shift >>> C++ doesn't support >>> operator.
Java supports unsigned right shift >>> operator that
fills zero at the top for the negative numbers. For
positive numbers, it works same like >> operator.
Inheritance Tree C++ always creates a new inheritance tree.
Java always uses a single inheritance tree because all
classes are the child of the Object class in Java. The
Object class is the root of the inheritance tree in
java.
Hardware C++ is nearer to hardware. Java is not so interactive with hardware.
Object-oriented
C++ is an object-oriented language. However, in the
C language, a single root hierarchy is not possible.
Java is also an object-oriented language. However,
everything (except fundamental types) is an object in
Java. It is a single root hierarchy as everything gets
derived from java.lang.Object.
 Java doesn't support default arguments like
C++.
 Java does not support header files like C++.
Java uses the import keyword to include
different classes and methods.
C++ Program Example Java Program Example
File: simple.cpp
#include <iostream.h>
using namespace std;
int main() {
cout << "Hello C++ Programmi
ng";
return 0;
}
Output:
Hello C++ Programming
File: Simple.java
class Simple
{
public static void main(String a
rgs[]){
System.out.println("Hello Java"
);
}
}
Output:
Hello Java
 To learn Java, you must have the basic knowledge
of C/C++ programming language.
 For executing any Java program, the following
software or application must be properly
installed.
◦ Install the JDK if you don't have installed it, download
the JDK and install it.
◦ Set path of the jdk/bin directory.
◦ Create the Java program using text editor.
◦ Save the program file as filename.java.
◦ Compile and run the Java program
 To compile: javac Simple.java
 To execute: java Simple
class Simple
{
public static void main(String args[]){
System.out.println("Hello Java");
}
}
Output:
Hello Java
 Every line of code that runs in Java must be inside a class. In
our example, we named the class Simple. A class should
always start with an uppercase first letter.
◦ Note: Java is case-sensitive: "MyClass" and "myclass" has different
meaning.
 The name of the java file must match the
class name. When saving the file, save it
using the class name and add ".java" to the
end of the filename.
The main Method
public static void main(String[] args)
 Any code inside the main() method will be
executed. Program execution starts from
main().
System.out.println()
 The println() method("print line“) is used to
print a line of text or a value to the screen (or
a file).
 Each code statement must end with a
semicolon (;).
 The Print() Method
 There is also a print() method, which is
similar to println().
 The only difference is that it does not insert a
new line at the end of the output:
Example
System.out.print("Hello World! ");
System.out.print("I will print on the same line.");
Output:::
Hello World! I will print on the same line.
Ad

More Related Content

Similar to JAVA introduction and basic understanding.pptx (20)

JAVA.ppsx java code java edv java development
JAVA.ppsx java code java edv java developmentJAVA.ppsx java code java edv java development
JAVA.ppsx java code java edv java development
wannabekrishna0
 
Java programming Evolution-OverviewOfJava.pdf
Java programming Evolution-OverviewOfJava.pdfJava programming Evolution-OverviewOfJava.pdf
Java programming Evolution-OverviewOfJava.pdf
AbhishekSingh961152
 
Java Basic.pdf
Java Basic.pdfJava Basic.pdf
Java Basic.pdf
TechSearchWeb
 
1 .java basic
1 .java basic1 .java basic
1 .java basic
Indu Sharma Bhardwaj
 
Java Tutorial to Learn Java Programming
Java Tutorial to Learn Java ProgrammingJava Tutorial to Learn Java Programming
Java Tutorial to Learn Java Programming
business Corporate
 
TechSearchWeb.pdf
TechSearchWeb.pdfTechSearchWeb.pdf
TechSearchWeb.pdf
TechSearchWeb
 
Technology Tutorial.pdf
Technology Tutorial.pdfTechnology Tutorial.pdf
Technology Tutorial.pdf
TechSearchWeb
 
1_Introduction to Java.pptx java programming
1_Introduction to Java.pptx java programming1_Introduction to Java.pptx java programming
1_Introduction to Java.pptx java programming
amitraj53904
 
Java programming material for beginners by Nithin, VVCE, Mysuru
Java programming material for beginners by Nithin, VVCE, MysuruJava programming material for beginners by Nithin, VVCE, Mysuru
Java programming material for beginners by Nithin, VVCE, Mysuru
Nithin Kumar,VVCE, Mysuru
 
TechSearchWeb Tutorials.pdf
TechSearchWeb Tutorials.pdfTechSearchWeb Tutorials.pdf
TechSearchWeb Tutorials.pdf
TechSearchWeb
 
Java ms harsha
Java ms harshaJava ms harsha
Java ms harsha
Harsha Batra
 
Java - At a glance
Java - At a glanceJava - At a glance
Java - At a glance
Nitish Baranwal
 
Core Java Slides
Core Java SlidesCore Java Slides
Core Java Slides
Vinit Vyas
 
Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...
Mr. Akaash
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docx
vikasbagra9887
 
Iintroduction to java , Java Coding , basics of java.pptx
Iintroduction to java , Java Coding , basics of java.pptxIintroduction to java , Java Coding , basics of java.pptx
Iintroduction to java , Java Coding , basics of java.pptx
MayankParashar31
 
Java Evolution-2.pdf
Java Evolution-2.pdfJava Evolution-2.pdf
Java Evolution-2.pdf
kumari36
 
Java Programming
Java ProgrammingJava Programming
Java Programming
Prof. Dr. K. Adisesha
 
Chapter One Basics ofJava Programmming.pptx
Chapter One Basics ofJava Programmming.pptxChapter One Basics ofJava Programmming.pptx
Chapter One Basics ofJava Programmming.pptx
Prashant416351
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdf
AdiseshaK
 
JAVA.ppsx java code java edv java development
JAVA.ppsx java code java edv java developmentJAVA.ppsx java code java edv java development
JAVA.ppsx java code java edv java development
wannabekrishna0
 
Java programming Evolution-OverviewOfJava.pdf
Java programming Evolution-OverviewOfJava.pdfJava programming Evolution-OverviewOfJava.pdf
Java programming Evolution-OverviewOfJava.pdf
AbhishekSingh961152
 
Java Tutorial to Learn Java Programming
Java Tutorial to Learn Java ProgrammingJava Tutorial to Learn Java Programming
Java Tutorial to Learn Java Programming
business Corporate
 
Technology Tutorial.pdf
Technology Tutorial.pdfTechnology Tutorial.pdf
Technology Tutorial.pdf
TechSearchWeb
 
1_Introduction to Java.pptx java programming
1_Introduction to Java.pptx java programming1_Introduction to Java.pptx java programming
1_Introduction to Java.pptx java programming
amitraj53904
 
Java programming material for beginners by Nithin, VVCE, Mysuru
Java programming material for beginners by Nithin, VVCE, MysuruJava programming material for beginners by Nithin, VVCE, Mysuru
Java programming material for beginners by Nithin, VVCE, Mysuru
Nithin Kumar,VVCE, Mysuru
 
TechSearchWeb Tutorials.pdf
TechSearchWeb Tutorials.pdfTechSearchWeb Tutorials.pdf
TechSearchWeb Tutorials.pdf
TechSearchWeb
 
Core Java Slides
Core Java SlidesCore Java Slides
Core Java Slides
Vinit Vyas
 
Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...
Mr. Akaash
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docx
vikasbagra9887
 
Iintroduction to java , Java Coding , basics of java.pptx
Iintroduction to java , Java Coding , basics of java.pptxIintroduction to java , Java Coding , basics of java.pptx
Iintroduction to java , Java Coding , basics of java.pptx
MayankParashar31
 
Java Evolution-2.pdf
Java Evolution-2.pdfJava Evolution-2.pdf
Java Evolution-2.pdf
kumari36
 
Chapter One Basics ofJava Programmming.pptx
Chapter One Basics ofJava Programmming.pptxChapter One Basics ofJava Programmming.pptx
Chapter One Basics ofJava Programmming.pptx
Prashant416351
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdf
AdiseshaK
 

Recently uploaded (20)

The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
LDMMIA Reiki Yoga S6 Free Workshop Money Pt 2
LDMMIA Reiki Yoga S6 Free Workshop Money Pt 2LDMMIA Reiki Yoga S6 Free Workshop Money Pt 2
LDMMIA Reiki Yoga S6 Free Workshop Money Pt 2
LDM & Mia eStudios
 
Module_2_Types_and_Approaches_of_Research (2).pptx
Module_2_Types_and_Approaches_of_Research (2).pptxModule_2_Types_and_Approaches_of_Research (2).pptx
Module_2_Types_and_Approaches_of_Research (2).pptx
drroxannekemp
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
How to Configure Extra Steps During Checkout in Odoo 18 Website
How to Configure Extra Steps During Checkout in Odoo 18 WebsiteHow to Configure Extra Steps During Checkout in Odoo 18 Website
How to Configure Extra Steps During Checkout in Odoo 18 Website
Celine George
 
E-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26ASE-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26AS
Abinash Palangdar
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
IPL QUIZ | THE QUIZ CLUB OF PSGCAS | 2025.pdf
IPL QUIZ | THE QUIZ CLUB OF PSGCAS | 2025.pdfIPL QUIZ | THE QUIZ CLUB OF PSGCAS | 2025.pdf
IPL QUIZ | THE QUIZ CLUB OF PSGCAS | 2025.pdf
Quiz Club of PSG College of Arts & Science
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
Peer Assesment- Libby.docx..............
Peer Assesment- Libby.docx..............Peer Assesment- Libby.docx..............
Peer Assesment- Libby.docx..............
19lburrell
 
How to Use Upgrade Code Command in Odoo 18
How to Use Upgrade Code Command in Odoo 18How to Use Upgrade Code Command in Odoo 18
How to Use Upgrade Code Command in Odoo 18
Celine George
 
Cyber security COPA ITI MCQ Top Questions
Cyber security COPA ITI MCQ Top QuestionsCyber security COPA ITI MCQ Top Questions
Cyber security COPA ITI MCQ Top Questions
SONU HEETSON
 
Unit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptx
Unit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptxUnit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptx
Unit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptx
Mayuri Chavan
 
COPA Apprentice exam Questions and answers PDF
COPA Apprentice exam Questions and answers PDFCOPA Apprentice exam Questions and answers PDF
COPA Apprentice exam Questions and answers PDF
SONU HEETSON
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
GENERAL QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 4 MARCH 2025 .pdf
GENERAL QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 4 MARCH 2025 .pdfGENERAL QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 4 MARCH 2025 .pdf
GENERAL QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 4 MARCH 2025 .pdf
Quiz Club of PSG College of Arts & Science
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
INQUISITORS School Quiz Prelims 2025.pptx
INQUISITORS School Quiz Prelims 2025.pptxINQUISITORS School Quiz Prelims 2025.pptx
INQUISITORS School Quiz Prelims 2025.pptx
SujatyaRoy
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
LDMMIA Reiki Yoga S6 Free Workshop Money Pt 2
LDMMIA Reiki Yoga S6 Free Workshop Money Pt 2LDMMIA Reiki Yoga S6 Free Workshop Money Pt 2
LDMMIA Reiki Yoga S6 Free Workshop Money Pt 2
LDM & Mia eStudios
 
Module_2_Types_and_Approaches_of_Research (2).pptx
Module_2_Types_and_Approaches_of_Research (2).pptxModule_2_Types_and_Approaches_of_Research (2).pptx
Module_2_Types_and_Approaches_of_Research (2).pptx
drroxannekemp
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
How to Configure Extra Steps During Checkout in Odoo 18 Website
How to Configure Extra Steps During Checkout in Odoo 18 WebsiteHow to Configure Extra Steps During Checkout in Odoo 18 Website
How to Configure Extra Steps During Checkout in Odoo 18 Website
Celine George
 
E-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26ASE-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26AS
Abinash Palangdar
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
Peer Assesment- Libby.docx..............
Peer Assesment- Libby.docx..............Peer Assesment- Libby.docx..............
Peer Assesment- Libby.docx..............
19lburrell
 
How to Use Upgrade Code Command in Odoo 18
How to Use Upgrade Code Command in Odoo 18How to Use Upgrade Code Command in Odoo 18
How to Use Upgrade Code Command in Odoo 18
Celine George
 
Cyber security COPA ITI MCQ Top Questions
Cyber security COPA ITI MCQ Top QuestionsCyber security COPA ITI MCQ Top Questions
Cyber security COPA ITI MCQ Top Questions
SONU HEETSON
 
Unit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptx
Unit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptxUnit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptx
Unit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptx
Mayuri Chavan
 
COPA Apprentice exam Questions and answers PDF
COPA Apprentice exam Questions and answers PDFCOPA Apprentice exam Questions and answers PDF
COPA Apprentice exam Questions and answers PDF
SONU HEETSON
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
INQUISITORS School Quiz Prelims 2025.pptx
INQUISITORS School Quiz Prelims 2025.pptxINQUISITORS School Quiz Prelims 2025.pptx
INQUISITORS School Quiz Prelims 2025.pptx
SujatyaRoy
 
Ad

JAVA introduction and basic understanding.pptx

  • 2.  Java is a popular high level, robust, object- oriented and secure and platform independent programming language developed by Sun Microsystems (which is now the subsidiary of Oracle) in the early 1990s.  Most of the java syntax has derived from C/C++.  Sun released first JDK 1.0 in 1995.
  • 3.  Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.)  Platform: Any hardware or software environment in which a program runs, is known as a platform. Since Java has a runtime environment (JRE) and API(Application Programming Interface), it is called a platform.  One of the most popular programming language in the world and has a large demand in the current job market  It is easy to learn, simple to use, secure, fast and powerful  It is open-source and free
  • 4.  In 1991,James Gosling (father of Java), Patrick Naughton and Mike Sheridan (Green Team) first invented a new technology for convergence of digitally-controlled consumer devices and computers named as “The Green Project”.  Firstly, Java was called "Greentalk" by James Gosling, and the file extension was .gt. Initially it was designed for small, embedded systems in electronic appliances like set- top boxes.  Gosling created a new language named “Oak” to develop the graphics system of the controller and animated touch screen user interface. ◦ Oak is a symbol of strength and chosen as a national tree of many countries like the U.S.A., France, Germany, Romania, etc.  In 1995, Oak was renamed as "Java" because it was already a trademark by Oak Technologies.
  • 5.  Desktop Applications such as acrobat reader, media player, antivirus, etc.  Web Applications (Web servers and application servers) such as irctc.co.in, javatpoint.com, etc.  Enterprise Applications such as banking applications.  Mobile applications (specially Android apps).  Embedded System  Database connection  Smart Card  Robotics  Games, etc.
  • 6. 1. Standalone Application ◦ Also known as desktop applications / window-based applications. These are traditional software that we need to install on every machine. ◦ Examples: Media player, antivirus, etc. AWT and Swing are used in Java for creating standalone applications. 2. Web Application ◦ An application that runs on the server side and creates a dynamic page is called a web application. Following technologies are used for creating web applications in Java.  Servlet  JSP  Struts  Spring  Hibernate  JSF
  • 7. 3. Enterprise Application ◦ An application that is distributed in nature, such as banking applications, etc. is called an enterprise application. It has advantages like high-level security, load balancing, and clustering. ◦ In Java, EJB is used for creating enterprise applications. 4. Mobile Application ◦ An application which is created for mobile devices is called a mobile application. ◦ Currently, Android and Java ME are used for creating mobile applications.
  • 8.  Many java versions have been released till now. The current stable release of Java is Java SE 10. ◦ JDK Alpha and Beta (1995) ◦ JDK 1.0 (23rd Jan 1996) ◦ JDK 1.1 (19th Feb 1997) ◦ J2SE 1.2 (8th Dec 1998) ◦ J2SE 1.3 (8th May 2000) ◦ J2SE 1.4 (6th Feb 2002) ◦ J2SE 5.0 (30th Sep 2004) ◦ Java SE 6 (11th Dec 2006) ◦ Java SE 7 (28th July 2011) ◦ Java SE 8 (18th Mar 2014) ◦ Java SE 9 (21st Sep 2017) ◦ Java SE 10 (20th Mar 2018) ◦ Java SE 11 (September 2018) ◦ Java SE 12 (March 2019) ◦ Java SE 13 (September 2019) ◦ Java SE 14 (Mar 2020) ◦ Java SE 15 (September 2020) ◦ Java SE 16 (Mar 2021) ◦ Java SE 17 (September 2021) ◦ Java SE 18 (to be released by March 2022)
  • 9. There are 4 platforms or editions of Java Technology:  Java SE (Java Standard Edition) ◦ It is a Java programming platform. It includes Java programming APIs such as java.lang, java.io, java.net, java.util, java.sql, java.math etc. ◦ It includes core topics like OOPs, String, Regex, Exception, Inner classes, Multithreading, I/O Stream, Networking, AWT, Swing, Reflection, Collection, etc.  Java EE (Java Enterprise Edition) ◦ It is an enterprise platform that is mainly used to develop web and enterprise applications. It is built on top of the Java SE platform. ◦ It includes topics like Servlet, JSP, Web Services, EJB, JPA etc.  Java ME (Java Micro Edition) ◦ It is a micro platform that is dedicated to mobile applications.  Java FX ◦ It is used to develop rich internet applications. It uses a lightweight user interface API.
  • 10.  We can write Java code in a text editor or in an Integrated Development Environment, such as IntelliJ IDEA, Netbeans or Eclipse,
  • 11. Platform-independent C++ is platform-dependent. Java is platform-independent. Mainly used for System programming. Application programming. Used in Windows- based, web-based, enterprise, and mobile applications. Design Goal Designed for systems and applications programming. It was an extension of the C programming language. Designed and created as an interpreter for printing systems but later extended as a support network computing Goto Supports the goto statement. Doesn't support the goto statement. Multiple inheritance Supports multiple inheritance. Doesn't support multiple inheritance through class. It can be achieved by using interfaces in java. Operator Overloading Supports operator overloading. Doesn't support operator overloading. Pointers Supports pointers. You can write a pointer program in C++. Java supports pointer internally. However, you can't write the pointer program in java. Compiler and Interpreter Uses compiler only. C++ is compiled and run using the compiler which converts source code into machine code so, C++ is platform dependent. Uses both compiler and interpreter. Java source code is converted into bytecode at compilation time. The interpreter executes this bytecode at runtime and produces output. Java is interpreted that is why it is platform-independent. Call by Value and Call by reference Supports both call by value and call by reference. Supports call by value not call by reference.
  • 12. Comparison Index C++ Java Structure and Union C++ supports structures and unions. Java doesn't support structures and unions. Thread Support C++ doesn't have built-in support for threads. It relies on third-party libraries for thread support. Java has built-in thread support. Documentation comment C++ doesn't support documentation comments. Java supports documentation comment (/** ... */) to create documentation for java source code. Virtual Keyword C++ supports virtual keyword so that we can decide whether or not to override a function. Java has no virtual keyword. We can override all non-static methods by default. In other words, non- static methods are virtual by default. unsigned right shift >>> C++ doesn't support >>> operator. Java supports unsigned right shift >>> operator that fills zero at the top for the negative numbers. For positive numbers, it works same like >> operator. Inheritance Tree C++ always creates a new inheritance tree. Java always uses a single inheritance tree because all classes are the child of the Object class in Java. The Object class is the root of the inheritance tree in java. Hardware C++ is nearer to hardware. Java is not so interactive with hardware. Object-oriented C++ is an object-oriented language. However, in the C language, a single root hierarchy is not possible. Java is also an object-oriented language. However, everything (except fundamental types) is an object in Java. It is a single root hierarchy as everything gets derived from java.lang.Object.
  • 13.  Java doesn't support default arguments like C++.  Java does not support header files like C++. Java uses the import keyword to include different classes and methods. C++ Program Example Java Program Example File: simple.cpp #include <iostream.h> using namespace std; int main() { cout << "Hello C++ Programmi ng"; return 0; } Output: Hello C++ Programming File: Simple.java class Simple { public static void main(String a rgs[]){ System.out.println("Hello Java" ); } } Output: Hello Java
  • 14.  To learn Java, you must have the basic knowledge of C/C++ programming language.  For executing any Java program, the following software or application must be properly installed. ◦ Install the JDK if you don't have installed it, download the JDK and install it. ◦ Set path of the jdk/bin directory. ◦ Create the Java program using text editor. ◦ Save the program file as filename.java. ◦ Compile and run the Java program  To compile: javac Simple.java  To execute: java Simple
  • 15. class Simple { public static void main(String args[]){ System.out.println("Hello Java"); } } Output: Hello Java  Every line of code that runs in Java must be inside a class. In our example, we named the class Simple. A class should always start with an uppercase first letter. ◦ Note: Java is case-sensitive: "MyClass" and "myclass" has different meaning.
  • 16.  The name of the java file must match the class name. When saving the file, save it using the class name and add ".java" to the end of the filename. The main Method public static void main(String[] args)  Any code inside the main() method will be executed. Program execution starts from main(). System.out.println()  The println() method("print line“) is used to print a line of text or a value to the screen (or a file).
  • 17.  Each code statement must end with a semicolon (;).  The Print() Method  There is also a print() method, which is similar to println().  The only difference is that it does not insert a new line at the end of the output: Example System.out.print("Hello World! "); System.out.print("I will print on the same line."); Output::: Hello World! I will print on the same line.
  翻译: