SlideShare a Scribd company logo
Introduction to Java
Technology
Module 1
Objectives
• Explaining Java Technology
• Describe key concepts of Java programming language
• List Java product groups
• Write, compile and execute a simple java program
• Explain the key concepts in a simple program
What Java is all about ?
Java was originated by James Gosling, Patrick
Naughton, Chris Warth, Ed Frank, and Mike Sheridan at
Sun Microsystems in 1991. This language was initially
called “Oak” but was renamed “Java” in 1995. Somewhat
surprisingly, the original impetus for Java was not the
Internet! Instead, the primary motivation was the need
for a platform-independent language that could be used
to create software to be embedded in various consumer
electronic devices, such as toasters, microwave ovens,
and remote controls.
The Java programming language was designed to be:
 Distributed - Java was designed with the distributed environment of the
Internet in mind.
 Simple - Java has a concise, cohesive set of features that makes it easy
to learn and use.
 Multithreaded - Java provides integrated support for multithreaded
programming.
 Object – oriented - Java embodies the modern, object-oriented programming
philosophy.
 Secure - Java provides a secure means of creating Internet applications.
 Platform-independent - Java is not tied to a specific machine or operating
system architecture.
 Portable - Java programs can execute in any environment for which there is a
Java run-time system.
 Robust - Java encourages error-free programming by being strictly typed and
performing run-time checks.
Java versions
• Java 1.0 released in 1995
• Java 1.1 released in 1997
• Java 2 Platform released in December 1998
• Standard Edition (JDK 1.2)
• JDK 1.3 released in 2000
• JDK 1.4 released in 2002
• JDK 5 released in 2004
• JDK 6 released in 2006
• JDK 7 released in 2011
As WWW was becoming popular it was difficult for Sun to
manage whole thing as one platform. So they divided Java
into three different platform.
A Simple Java Program
class Example {
public static void main(String args[]) {
System.out.println(“Welcome to Java");
}
}
1. Type this code in a new text document and save in D:workplace as Example.java
2. Open console(DOS) application and give D: and cd workplace .
3. Then issue command javac Example.java. If source file contains no errors
Example.class file will be created.
4. Then issue java Example command to run this program. “Welcome to Java”
should be printed in the console.
How it works ?
In the Java programming language, all source code is first written in plain text
files ending with the .java extension. Those source files are then compiled
into .class files by the javac compiler. A .class file does not contain code that is
native to your processor; it instead contains bytecodes — the machine
language of the Java Virtual Machine1 (Java VM). The java launcher tool then
runs your application with an instance of the Java Virtual Machine.
• class Example {
This line uses the keyword class to declare that a new class is being defined.
As mentioned, the class is Java’s basic unit of encapsulation. Example is the
name of the class. The class definition begins with the opening curly brace ({)
and ends with the closing curly brace (}).
• public static void main (String args[]) {
This line begins the main( ) method. As mentioned earlier, in Java, a
subroutine is called a method. As the comment preceding it suggests, this is
the line at which the program will begin executing. All Java applications begin
execution by calling main( ). The exact meaning of each part of this line
cannot be given now, since it involves a detailed understanding of several
other of Java’s features. As stated, main( ) is the method called when a Java
application begins.
• System.out.println(“Welcome to Java");
This line outputs the string “Welcome to Java" followed by a new line
on the screen.Output is actually accomplished by the built-in println( )
method. In this case, println( ) displays the string which is passed to it. As you
will see, println( ) can be used to display other types of information, too. The
line begins with System.out.

More Related Content

What's hot

Basic of Java
Basic of JavaBasic of Java
Basic of Java
Ajeet Kumar Verma
 
Java programming course for beginners
Java programming course for beginnersJava programming course for beginners
Java programming course for beginners
Eduonix Learning Solutions
 
Java tutorial PPT
Java tutorial PPTJava tutorial PPT
Java tutorial PPT
Intelligo Technologies
 
Java architecture
Java architectureJava architecture
Java architecture
Rakesh Vadnala
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
Sandeep Rawat
 
QSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and JitQSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and Jit
Qspiders - Software Testing Training Institute
 
Presentation on Core java
Presentation on Core javaPresentation on Core java
Presentation on Core java
mahir jain
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)
Sujit Majety
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
Ravi Kant Sahu
 
Core Java
Core JavaCore Java
Core Java
Priyanka Pradhan
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
jaimefrozr
 
Introduction To Java.
Introduction To Java.Introduction To Java.
Introduction To Java.
Tushar Chauhan
 
Java-java virtual machine
Java-java virtual machineJava-java virtual machine
Java-java virtual machine
Surbhi Panhalkar
 
Operators in java
Operators in javaOperators in java
Operators in java
Madishetty Prathibha
 
Java Introduction
Java IntroductionJava Introduction
Java Introduction
sunmitraeducation
 
Java basics and java variables
Java basics and java variablesJava basics and java variables
Java basics and java variables
Pushpendra Tyagi
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
Veerabadra Badra
 

What's hot (20)

Basic of Java
Basic of JavaBasic of Java
Basic of Java
 
Java programming course for beginners
Java programming course for beginnersJava programming course for beginners
Java programming course for beginners
 
Java
JavaJava
Java
 
Java tutorial PPT
Java tutorial PPTJava tutorial PPT
Java tutorial PPT
 
Java architecture
Java architectureJava architecture
Java architecture
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
QSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and JitQSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and Jit
 
Presentation on Core java
Presentation on Core javaPresentation on Core java
Presentation on Core java
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
 
Core Java
Core JavaCore Java
Core Java
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
 
Introduction To Java.
Introduction To Java.Introduction To Java.
Introduction To Java.
 
Java-java virtual machine
Java-java virtual machineJava-java virtual machine
Java-java virtual machine
 
Operators in java
Operators in javaOperators in java
Operators in java
 
Features of java
Features of javaFeatures of java
Features of java
 
Java Introduction
Java IntroductionJava Introduction
Java Introduction
 
Method overloading
Method overloadingMethod overloading
Method overloading
 
Java basics and java variables
Java basics and java variablesJava basics and java variables
Java basics and java variables
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 

Viewers also liked

Java Basics
Java BasicsJava Basics
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technologysshhzap
 
Intuit commissions manager
Intuit commissions managerIntuit commissions manager
Intuit commissions managersshhzap
 
02 basic java programming and operators
02 basic java programming and operators02 basic java programming and operators
02 basic java programming and operators
Danairat Thanabodithammachari
 
Java session01
Java session01Java session01
Java session01Niit Care
 
Jena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for JavaJena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for JavaAleksander Pohl
 
Object Oriented Programming with Java
Object Oriented Programming with JavaObject Oriented Programming with Java
Object Oriented Programming with JavaJussi Pohjolainen
 
Object-Oriented Analysis And Design With Applications Grady Booch
Object-Oriented Analysis And Design With Applications Grady BoochObject-Oriented Analysis And Design With Applications Grady Booch
Object-Oriented Analysis And Design With Applications Grady Booch
Sorina Chirilă
 

Viewers also liked (8)

Java Basics
Java BasicsJava Basics
Java Basics
 
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technology
 
Intuit commissions manager
Intuit commissions managerIntuit commissions manager
Intuit commissions manager
 
02 basic java programming and operators
02 basic java programming and operators02 basic java programming and operators
02 basic java programming and operators
 
Java session01
Java session01Java session01
Java session01
 
Jena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for JavaJena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for Java
 
Object Oriented Programming with Java
Object Oriented Programming with JavaObject Oriented Programming with Java
Object Oriented Programming with Java
 
Object-Oriented Analysis And Design With Applications Grady Booch
Object-Oriented Analysis And Design With Applications Grady BoochObject-Oriented Analysis And Design With Applications Grady Booch
Object-Oriented Analysis And Design With Applications Grady Booch
 

Similar to Introduction to java technology

OOP with Java
OOP with JavaOOP with Java
OOP with Java
OmegaHub
 
Java introduction
Java introductionJava introduction
Java introduction
logeswarisaravanan
 
CORE JAVA
CORE JAVACORE JAVA
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdf
AdiseshaK
 
Unit of competency
Unit of competencyUnit of competency
Unit of competency
loidasacueza
 
Java language: a gentle introduction
Java language: a gentle introductionJava language: a gentle introduction
Java language: a gentle introductionFabio Ferraguto
 
Java Programming
Java ProgrammingJava Programming
Java Programming
Prof. Dr. K. Adisesha
 
1.Intro--Why Java.pptx
1.Intro--Why Java.pptx1.Intro--Why Java.pptx
1.Intro--Why Java.pptx
YounasKhan542109
 
unit1.pptx
unit1.pptxunit1.pptx
unit1.pptx
PrasadKalal4
 
Java intro
Java introJava intro
Java intro
husnara mohammad
 
Java ppts unit1
Java ppts unit1Java ppts unit1
Java ppts unit1
Priya11Tcs
 
java basic for begginers
java basic for begginersjava basic for begginers
java basic for begginers
divaskrgupta007
 
Java interview question
Java interview questionJava interview question
Java interview question
simplidigital
 
Chapter 2.1
Chapter 2.1Chapter 2.1
Chapter 2.1sotlsoc
 
INTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATIONINTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATION
Ajit Yadav
 
Java
JavaJava
Java
kavirishi
 
Java Basics
Java BasicsJava Basics
Java Basics
Fahad Shahzad
 

Similar to Introduction to java technology (20)

OOP with Java
OOP with JavaOOP with Java
OOP with Java
 
Java introduction
Java introductionJava introduction
Java introduction
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdf
 
Unit of competency
Unit of competencyUnit of competency
Unit of competency
 
Java language: a gentle introduction
Java language: a gentle introductionJava language: a gentle introduction
Java language: a gentle introduction
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
1.Intro--Why Java.pptx
1.Intro--Why Java.pptx1.Intro--Why Java.pptx
1.Intro--Why Java.pptx
 
unit1.pptx
unit1.pptxunit1.pptx
unit1.pptx
 
Java intro
Java introJava intro
Java intro
 
Java ppts unit1
Java ppts unit1Java ppts unit1
Java ppts unit1
 
Javalecture 1
Javalecture 1Javalecture 1
Javalecture 1
 
01slide
01slide01slide
01slide
 
01slide
01slide01slide
01slide
 
java basic for begginers
java basic for begginersjava basic for begginers
java basic for begginers
 
Java interview question
Java interview questionJava interview question
Java interview question
 
Chapter 2.1
Chapter 2.1Chapter 2.1
Chapter 2.1
 
INTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATIONINTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATION
 
Java
JavaJava
Java
 
Java Basics
Java BasicsJava Basics
Java Basics
 

Recently uploaded

FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 

Introduction to java technology

  • 2. Objectives • Explaining Java Technology • Describe key concepts of Java programming language • List Java product groups • Write, compile and execute a simple java program • Explain the key concepts in a simple program
  • 3. What Java is all about ? Java was originated by James Gosling, Patrick Naughton, Chris Warth, Ed Frank, and Mike Sheridan at Sun Microsystems in 1991. This language was initially called “Oak” but was renamed “Java” in 1995. Somewhat surprisingly, the original impetus for Java was not the Internet! Instead, the primary motivation was the need for a platform-independent language that could be used to create software to be embedded in various consumer electronic devices, such as toasters, microwave ovens, and remote controls.
  • 4. The Java programming language was designed to be:  Distributed - Java was designed with the distributed environment of the Internet in mind.  Simple - Java has a concise, cohesive set of features that makes it easy to learn and use.  Multithreaded - Java provides integrated support for multithreaded programming.  Object – oriented - Java embodies the modern, object-oriented programming philosophy.  Secure - Java provides a secure means of creating Internet applications.  Platform-independent - Java is not tied to a specific machine or operating system architecture.  Portable - Java programs can execute in any environment for which there is a Java run-time system.  Robust - Java encourages error-free programming by being strictly typed and performing run-time checks.
  • 5. Java versions • Java 1.0 released in 1995 • Java 1.1 released in 1997 • Java 2 Platform released in December 1998 • Standard Edition (JDK 1.2) • JDK 1.3 released in 2000 • JDK 1.4 released in 2002 • JDK 5 released in 2004 • JDK 6 released in 2006 • JDK 7 released in 2011
  • 6. As WWW was becoming popular it was difficult for Sun to manage whole thing as one platform. So they divided Java into three different platform.
  • 7. A Simple Java Program class Example { public static void main(String args[]) { System.out.println(“Welcome to Java"); } } 1. Type this code in a new text document and save in D:workplace as Example.java 2. Open console(DOS) application and give D: and cd workplace . 3. Then issue command javac Example.java. If source file contains no errors Example.class file will be created. 4. Then issue java Example command to run this program. “Welcome to Java” should be printed in the console.
  • 8. How it works ? In the Java programming language, all source code is first written in plain text files ending with the .java extension. Those source files are then compiled into .class files by the javac compiler. A .class file does not contain code that is native to your processor; it instead contains bytecodes — the machine language of the Java Virtual Machine1 (Java VM). The java launcher tool then runs your application with an instance of the Java Virtual Machine.
  • 9.
  • 10. • class Example { This line uses the keyword class to declare that a new class is being defined. As mentioned, the class is Java’s basic unit of encapsulation. Example is the name of the class. The class definition begins with the opening curly brace ({) and ends with the closing curly brace (}). • public static void main (String args[]) { This line begins the main( ) method. As mentioned earlier, in Java, a subroutine is called a method. As the comment preceding it suggests, this is the line at which the program will begin executing. All Java applications begin execution by calling main( ). The exact meaning of each part of this line cannot be given now, since it involves a detailed understanding of several other of Java’s features. As stated, main( ) is the method called when a Java application begins.
  • 11. • System.out.println(“Welcome to Java"); This line outputs the string “Welcome to Java" followed by a new line on the screen.Output is actually accomplished by the built-in println( ) method. In this case, println( ) displays the string which is passed to it. As you will see, println( ) can be used to display other types of information, too. The line begins with System.out.