SlideShare a Scribd company logo
1 of 24
Download to read offline
Introduction
to Java Applications
By:
Ajit Vijayee Yadav
OBJECTIVES
 Introduction
 History
 Need for Java
 The Evolution of Java
 Characteristics of Java

 Java Architecture
 How Java Works
 Java Architectural Security
 Sample Program in Java
 Conclusions
 Reference

2
Introduction to Java
 James Gosling-1995
 Java is an OOP language that was designed to meet the

need for the platform-independent language. Java is
used to create application that can run on a single
computer as well as a distributed network. Java is used
to develop a stand-alone and Internet-based
applications.
 The Java programs works on any type of compatible
device that supports Java.
History of Java
 Java programming language was originally developed

by Sun Microsystems, which was initiated by James
Gosling and released in 1995 .
 As of December 08 the latest release of the Java
Standard Edition is 6 (J2SE).
 Sun Microsystems has renamed the new J2 versions as
Java SE, Java EE and Java ME respectively. Java is
guaranteed to be Write Once, Run Anywhere
Needs for Java
• Java can be used to write variety of application
o Applications that use CUI
o Application that use GUI
o Applets

o Servlets
o Packages
The Evolution of Java
Year
1990
1991

1993

Development
Sun Microsystems developed software to
manipulate electronic devices.
A new language named Oak was introduced
using the most popular object-oriented
language C++.
World Wide Web(WWW) appeared on the
Internet that transformed the text-based
Internet into graphical Internet.
1994

1995
1996

The Sun Microsystems team developed a Web
browser called HotJava to locate and run
applets programs on Internet.
Oak was rename as Java.
Java was established as an object-oriented
language.
Characteristics of Java
 Java Applets
 Java’s Magic
 Servlets : Java on the server side

Other characteristics of Java
Simple
Secure
Portable
Object Oriented
Robust etc.
Java Architecture
 Various components of Java architecture are:
Java programming language and class file
JVM
Java Application Programming Interface (API)
The Java Programming
Environment
How Java Works
 Java's platform independence is achieved by the use of

the Java Virtual Machine
 A Java program consists of one or more files with a
.java extension
 The .class file contains Java bytecode.
 Bytecode is like machine language, but it is intended
for the Java Virtual Machine not a specific chip such as
a Pentium or PowerPC chip
 Some people refer to the interpreter as "The Java
Virtual Machine" (JVM)
Java Architectural Security
 The Java architecture also consist of few security

features that make Java a secure programming
language. The architecture consists of the following
security features:
Compiler level security
Bytecode verifier
Class loader
Sandbox model
Sample Program in Java
1.//Text-printing program.
2.
3. Public class Welcome
4.{
5.
//main method begins execution of java
application
6.
Public static void main(String arg[ ])
7.
{
8.
System.out.println(“welcome to Java
Programming”);
9.
}//end method main
10.
}//end class Welcome
Output :
Welcome to Java Programming
Comments
 Comments start with: //
 Comments ignored during program execution
 Document and describe code
 Provides code readability
 Traditional comments: /* ... */
/* This is a traditional
comment. It can be
split over many lines */
 Another line of comments
 Note: line numbers not part of program, added for reference
First Program in Java: Printing a Line of Text
(Cont.)
3

 Blank line



4

Makes program more readable
Blank lines, spaces, and tabs are white-space characters
 Ignored by compiler
public class Welcome1

 Begins class declaration for class Welcome1





Every Java program has at least one user-defined class
Keyword: words reserved for use by Java
 class keyword followed by class name
Naming classes: capitalize every word
 SampleClassName

16
First Program in Java: Printing a Line of Text
(Cont.)
4

public class Welcome1

 Java identifier








Series of characters consisting of letters, digits,
underscores ( _ ) and dollar signs ( $ )
Does not begin with a digit, has no spaces
Examples: Welcome1, $value, _value, button7
 7button is invalid
Java is case sensitive (capitalization matters)
 a1 and A1 are different

 In chapters 2 to 7, start each class with public class


Details of this covered later
17
First Program in Java: Printing a Line of Text
(Cont.)
4

public class Welcome1

 Saving files


5

File name must be class name with .java extension
Welcome1.java
{

 Left brace {



Begins body of every class
Right brace ends declarations (line 13)

18
First Program in Java: Printing a Line of Text
(Cont.)
7

public static void main( String args[] )

 Part of every Java application




Applications begin executing at main
 Parentheses indicate main is a method (Ch. 3 and 6)
 Java applications contain one or more methods
Exactly one method must be called main

 Methods can perform tasks and return information


8

void means main returns no information
For now, mimic main's first line
{

 Left brace begins body of method declaration


Ended by right brace } (line 11)

19
First Program in Java: Printing a Line of Text
(Cont.)
System.out.println( "Welcome to Java Programming!" );

9

 Instructs computer to perform an action




Prints string of characters
 String – series of characters inside double quotes
White-spaces in strings are not ignored by compiler

 System.out



Standard output object
Print to command window (i.e., MS-DOS prompt)

 Method System.out.println


Displays line of text

 This line known as a statement


Statements must end with semicolon ;

20
First Program in Java: Printing a Line of Text
(Cont.)
11

} // end method main

 Ends method declaration
13

} // end class Welcome1

 Ends class declaration
 Can add comments to keep track of ending braces

21
First Program in Java: Printing a Line of Text
(Cont.)
 Executing a program
 Type java Welcome1






Launches JVM
JVM loads .class file for class Welcome1
.class extension omitted from command
JVM calls method main

22
Conclusion
Finally conclusion of this training is great .which is
helping for the basic knowledge about robotics and
own analog design .This training is six week .which is
good and impressive content in the training to help in
my success of Robotics career
REFERENCES
1.Internet (Wiki.com)
2.Teacher and friends
3.Books (Reference to Java And PHP )
4.NIIT Student Guide

More Related Content

What's hot

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
 
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technologysshhzap
 
Core Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsCore Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsMahika Tutorials
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javaSaba Ameer
 
Introduction to java
Introduction to java Introduction to java
Introduction to java Sandeep Rawat
 
JRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVAJRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVAMehak Tawakley
 
Java Presentation
Java PresentationJava Presentation
Java Presentationaitrichtech
 
Genesis and Overview of Java
Genesis and Overview of Java Genesis and Overview of Java
Genesis and Overview of Java Ravi_Kant_Sahu
 
Training on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan SanidhyaTraining on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan SanidhyaShravan Sanidhya
 
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...Edureka!
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javaAjay Sharma
 
Java byte code presentation
Java byte code presentationJava byte code presentation
Java byte code presentationMahnoor Hashmi
 

What's hot (20)

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...
 
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technology
 
Java basic
Java basicJava basic
Java basic
 
Core Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsCore Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika Tutorials
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
JRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVAJRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVA
 
core java
core javacore java
core java
 
Java Presentation
Java PresentationJava Presentation
Java Presentation
 
Genesis and Overview of Java
Genesis and Overview of Java Genesis and Overview of Java
Genesis and Overview of Java
 
JAVA PPT Part-1 BY ADI.pdf
JAVA PPT Part-1 BY ADI.pdfJAVA PPT Part-1 BY ADI.pdf
JAVA PPT Part-1 BY ADI.pdf
 
JVM
JVMJVM
JVM
 
Training on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan SanidhyaTraining on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan Sanidhya
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
 
Java
JavaJava
Java
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Java architecture
Java architectureJava architecture
Java architecture
 
Java byte code presentation
Java byte code presentationJava byte code presentation
Java byte code presentation
 

Similar to Introduction to Java Applications - A Concise Guide to the History, Concepts and Sample Code

Similar to Introduction to Java Applications - A Concise Guide to the History, Concepts and Sample Code (20)

Javalecture 1
Javalecture 1Javalecture 1
Javalecture 1
 
Chapter 2.1
Chapter 2.1Chapter 2.1
Chapter 2.1
 
Java lab1 manual
Java lab1 manualJava lab1 manual
Java lab1 manual
 
Java platform
Java platformJava platform
Java platform
 
Mpl 1
Mpl 1Mpl 1
Mpl 1
 
Unit of competency
Unit of competencyUnit of competency
Unit of competency
 
01slide
01slide01slide
01slide
 
01slide
01slide01slide
01slide
 
OOPS JAVA.pdf
OOPS JAVA.pdfOOPS JAVA.pdf
OOPS JAVA.pdf
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
 
Java interview question
Java interview questionJava interview question
Java interview question
 
Java programming language basics
Java programming language basicsJava programming language basics
Java programming language basics
 
Chapter 1.3
Chapter 1.3Chapter 1.3
Chapter 1.3
 
Introduction to Java Applications
Introduction to Java ApplicationsIntroduction to Java Applications
Introduction to Java Applications
 
Introduction to java technology
Introduction to java technologyIntroduction to java technology
Introduction to java technology
 
Unit-IV_Introduction to Java.pdf
Unit-IV_Introduction to Java.pdfUnit-IV_Introduction to Java.pdf
Unit-IV_Introduction to Java.pdf
 
Java Standard edition(Java ) programming Basics for beginner's
Java Standard edition(Java ) programming Basics  for beginner'sJava Standard edition(Java ) programming Basics  for beginner's
Java Standard edition(Java ) programming Basics for beginner's
 
Java introduction
Java introductionJava introduction
Java introduction
 
Java Lecture 1
Java Lecture 1Java Lecture 1
Java Lecture 1
 
(Ebook pdf) java programming language basics
(Ebook pdf)   java programming language basics(Ebook pdf)   java programming language basics
(Ebook pdf) java programming language basics
 

More from Ajit Yadav

Cloud Computing Documentation Report
Cloud Computing Documentation ReportCloud Computing Documentation Report
Cloud Computing Documentation ReportAjit Yadav
 
Remote Admittance
Remote AdmittanceRemote Admittance
Remote AdmittanceAjit Yadav
 
Cloud computing
Cloud computingCloud computing
Cloud computingAjit Yadav
 

More from Ajit Yadav (6)

Cloud Computing Documentation Report
Cloud Computing Documentation ReportCloud Computing Documentation Report
Cloud Computing Documentation Report
 
Remote Admittance
Remote AdmittanceRemote Admittance
Remote Admittance
 
Frame Relay
Frame RelayFrame Relay
Frame Relay
 
Phishing
PhishingPhishing
Phishing
 
Php mysql
Php mysqlPhp mysql
Php mysql
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 

Recently uploaded

Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Celine George
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...Nguyen Thanh Tu Collection
 
An Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERPAn Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERPCeline George
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesVijayaLaxmi84
 
How to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineHow to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineCeline George
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...HetalPathak10
 
4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptxmary850239
 
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...Osopher
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxAnupam32727
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfChristalin Nelson
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxDhatriParmar
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17Celine George
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 

Recently uploaded (20)

Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
 
An Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERPAn Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERP
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their uses
 
How to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineHow to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command Line
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
 
4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx
 
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdf
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 

Introduction to Java Applications - A Concise Guide to the History, Concepts and Sample Code

  • 2. OBJECTIVES  Introduction  History  Need for Java  The Evolution of Java  Characteristics of Java  Java Architecture  How Java Works  Java Architectural Security  Sample Program in Java  Conclusions  Reference 2
  • 3. Introduction to Java  James Gosling-1995  Java is an OOP language that was designed to meet the need for the platform-independent language. Java is used to create application that can run on a single computer as well as a distributed network. Java is used to develop a stand-alone and Internet-based applications.  The Java programs works on any type of compatible device that supports Java.
  • 4. History of Java  Java programming language was originally developed by Sun Microsystems, which was initiated by James Gosling and released in 1995 .  As of December 08 the latest release of the Java Standard Edition is 6 (J2SE).  Sun Microsystems has renamed the new J2 versions as Java SE, Java EE and Java ME respectively. Java is guaranteed to be Write Once, Run Anywhere
  • 5. Needs for Java • Java can be used to write variety of application o Applications that use CUI o Application that use GUI o Applets o Servlets o Packages
  • 6. The Evolution of Java Year 1990 1991 1993 Development Sun Microsystems developed software to manipulate electronic devices. A new language named Oak was introduced using the most popular object-oriented language C++. World Wide Web(WWW) appeared on the Internet that transformed the text-based Internet into graphical Internet.
  • 7. 1994 1995 1996 The Sun Microsystems team developed a Web browser called HotJava to locate and run applets programs on Internet. Oak was rename as Java. Java was established as an object-oriented language.
  • 8. Characteristics of Java  Java Applets  Java’s Magic  Servlets : Java on the server side Other characteristics of Java Simple Secure Portable Object Oriented Robust etc.
  • 9. Java Architecture  Various components of Java architecture are: Java programming language and class file JVM Java Application Programming Interface (API)
  • 11. How Java Works  Java's platform independence is achieved by the use of the Java Virtual Machine  A Java program consists of one or more files with a .java extension  The .class file contains Java bytecode.  Bytecode is like machine language, but it is intended for the Java Virtual Machine not a specific chip such as a Pentium or PowerPC chip  Some people refer to the interpreter as "The Java Virtual Machine" (JVM)
  • 12. Java Architectural Security  The Java architecture also consist of few security features that make Java a secure programming language. The architecture consists of the following security features: Compiler level security Bytecode verifier Class loader Sandbox model
  • 13. Sample Program in Java 1.//Text-printing program. 2. 3. Public class Welcome 4.{ 5. //main method begins execution of java application 6. Public static void main(String arg[ ]) 7. { 8. System.out.println(“welcome to Java Programming”);
  • 14. 9. }//end method main 10. }//end class Welcome Output : Welcome to Java Programming
  • 15. Comments  Comments start with: //  Comments ignored during program execution  Document and describe code  Provides code readability  Traditional comments: /* ... */ /* This is a traditional comment. It can be split over many lines */  Another line of comments  Note: line numbers not part of program, added for reference
  • 16. First Program in Java: Printing a Line of Text (Cont.) 3  Blank line   4 Makes program more readable Blank lines, spaces, and tabs are white-space characters  Ignored by compiler public class Welcome1  Begins class declaration for class Welcome1    Every Java program has at least one user-defined class Keyword: words reserved for use by Java  class keyword followed by class name Naming classes: capitalize every word  SampleClassName 16
  • 17. First Program in Java: Printing a Line of Text (Cont.) 4 public class Welcome1  Java identifier     Series of characters consisting of letters, digits, underscores ( _ ) and dollar signs ( $ ) Does not begin with a digit, has no spaces Examples: Welcome1, $value, _value, button7  7button is invalid Java is case sensitive (capitalization matters)  a1 and A1 are different  In chapters 2 to 7, start each class with public class  Details of this covered later 17
  • 18. First Program in Java: Printing a Line of Text (Cont.) 4 public class Welcome1  Saving files   5 File name must be class name with .java extension Welcome1.java {  Left brace {   Begins body of every class Right brace ends declarations (line 13) 18
  • 19. First Program in Java: Printing a Line of Text (Cont.) 7 public static void main( String args[] )  Part of every Java application   Applications begin executing at main  Parentheses indicate main is a method (Ch. 3 and 6)  Java applications contain one or more methods Exactly one method must be called main  Methods can perform tasks and return information   8 void means main returns no information For now, mimic main's first line {  Left brace begins body of method declaration  Ended by right brace } (line 11) 19
  • 20. First Program in Java: Printing a Line of Text (Cont.) System.out.println( "Welcome to Java Programming!" ); 9  Instructs computer to perform an action   Prints string of characters  String – series of characters inside double quotes White-spaces in strings are not ignored by compiler  System.out   Standard output object Print to command window (i.e., MS-DOS prompt)  Method System.out.println  Displays line of text  This line known as a statement  Statements must end with semicolon ; 20
  • 21. First Program in Java: Printing a Line of Text (Cont.) 11 } // end method main  Ends method declaration 13 } // end class Welcome1  Ends class declaration  Can add comments to keep track of ending braces 21
  • 22. First Program in Java: Printing a Line of Text (Cont.)  Executing a program  Type java Welcome1     Launches JVM JVM loads .class file for class Welcome1 .class extension omitted from command JVM calls method main 22
  • 23. Conclusion Finally conclusion of this training is great .which is helping for the basic knowledge about robotics and own analog design .This training is six week .which is good and impressive content in the training to help in my success of Robotics career
  • 24. REFERENCES 1.Internet (Wiki.com) 2.Teacher and friends 3.Books (Reference to Java And PHP ) 4.NIIT Student Guide