SlideShare a Scribd company logo
Java Programming - Intro
Oum Saokosal
Master’s Degree in information systems,Jeonju
University,South Korea
012 252 752 / 070 252 752
oumsaokosal@gmail.com
Contact Me
• Tel: 012 252 752 / 070 252 752
• Email: oumsaokosal@gmail.com
• FB Page: https://facebook.com/kosalgeek
• PPT: http://www.slideshare.net/oumsaokosal
• YouTube: https://www.youtube.com/user/oumsaokosal
• Twitter: https://twitter.com/okosal
• Web: http://kosalgeek.com
History
•JamesGosling and Sun Microsystems
•Oak
•Java, May 20, 1995, SunWorld
•JavaApplet
•Java SE,Java EE, Java Java ME
•Android uses Java, doesn’t use JVM
3
Features of Java
• Java is object-oriented
• Java is interpreted
• Java is architecture-neutral
• Java is portable
• Java is multithreaded
• Java is dynamic
4
Java IDETools
• Eclipse
• Netbeans
• IntelliJ IDEA
5
Getting Started with Java
Programming
•A SimpleJavaApplication
•Compiling Programs
•ExecutingApplications
6
A Simple Application
Example 1.1
//This application program prints Welcome
//to Java!
package chapter1;
public class Welcome {
public static void main(String[] args) {
System.out.println("Welcome to Java!");
}
}
7
ExecutingApplications
•Compile: javac Welcome.java
•Run: java Welcome.class
8
Java
Interpreter
on Windows
Java
Interpreter
on Sun Solaris
Java
Interpreter
on Linux
Bytecode
Java
Interpreter
on Mac OS
Comments
In Java,comments:
//this is a single line comment
/* this is
a multiline comment
*/
9
Reserved Words
Reservedwords or keywords:
- class
- public
- static
- void
- int
- package
10
Modifiers
public
private
protected
(default)
11
Classes
A class is a template or blueprint for
objects.
public class Welcome {
}
12
Methods
Method: a collection of statements
that performs a sequence of
operations
It can be used even without fully
understanding the details of how it
works.
13
main Method
The main method provides the control of
program flow.The Java interpreter executes
the application by invoking the main method.
The main method looks like this:
public static void main(String[] args)
{
// Statements;
} 14
Ad

Recommended

PROBLEM SOLVING TECHNIQUES
PROBLEM SOLVING TECHNIQUES
sudhanagarajan5
 
Hill Cipher-Three cross Three Matrix.pdf
Hill Cipher-Three cross Three Matrix.pdf
sathyaaaaa1
 
Object and class relationships
Object and class relationships
Pooja mittal
 
Programming Paradigm & Languages
Programming Paradigm & Languages
Gaditek
 
introduction to visual basic PPT.pptx
introduction to visual basic PPT.pptx
classall
 
The Waterfall Model
The Waterfall Model
Damian T. Gordon
 
SDLC Model (Waterfall,Iterative Waterfall,Spiral)
SDLC Model (Waterfall,Iterative Waterfall,Spiral)
Shaikh Kamrul Islam (Konok kamrul)
 
1.3 variables
1.3 variables
allenbailey
 
Visual basic
Visual basic
umesh patil
 
Unit 4- Software Engineering System Model Notes
Unit 4- Software Engineering System Model Notes
arvind pandey
 
Libre Office Impress Lesson 2: Creating a Slide Show
Libre Office Impress Lesson 2: Creating a Slide Show
Smart Chicago Collaborative
 
Software design
Software design
Syed Muhammad Hammad-ud-Din
 
Engineering Software Products: 4. software architecture
Engineering Software Products: 4. software architecture
software-engineering-book
 
Security & protection in operating system
Security & protection in operating system
Abou Bakr Ashraf
 
Object Oriented Programming with JAVA
Object Oriented Programming with JAVA
Demian Antony DMello
 
50 MS Excel Tips and Tricks
50 MS Excel Tips and Tricks
BurCom Consulting Ltd.
 
Waterfall model ppt final
Waterfall model ppt final
shiva krishna
 
androidstudio.pptx
androidstudio.pptx
SundaresanB5
 
Uint-5 Big data Frameworks.pdf
Uint-5 Big data Frameworks.pdf
Sitamarhi Institute of Technology
 
Introduction to Android and Android Studio
Introduction to Android and Android Studio
Suyash Srijan
 
Android app development - Java Programming for Android
Android app development - Java Programming for Android
OUM SAOKOSAL
 
Introduction to Advanced Javascript
Introduction to Advanced Javascript
Collaboration Technologies
 
Learning notes of r for python programmer (Temp1)
Learning notes of r for python programmer (Temp1)
Chia-Chi Chang
 
Analysis of Fatal Utah Avalanches with Python. From Scraping, Analysis, to In...
Analysis of Fatal Utah Avalanches with Python. From Scraping, Analysis, to In...
Matt Harrison
 
Meetup Python Nantes - les tests en python
Meetup Python Nantes - les tests en python
Arthur Lutz
 
Python - Lecture 1
Python - Lecture 1
Ravi Kiran Khareedi
 
Operator Overloading
Operator Overloading
Sardar Alam
 
PyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and More
Matt Harrison
 
Installing Python on Mac
Installing Python on Mac
Wei-Wen Hsu
 
Python for All
Python for All
Pragya Goyal
 

More Related Content

What's hot (12)

Visual basic
Visual basic
umesh patil
 
Unit 4- Software Engineering System Model Notes
Unit 4- Software Engineering System Model Notes
arvind pandey
 
Libre Office Impress Lesson 2: Creating a Slide Show
Libre Office Impress Lesson 2: Creating a Slide Show
Smart Chicago Collaborative
 
Software design
Software design
Syed Muhammad Hammad-ud-Din
 
Engineering Software Products: 4. software architecture
Engineering Software Products: 4. software architecture
software-engineering-book
 
Security & protection in operating system
Security & protection in operating system
Abou Bakr Ashraf
 
Object Oriented Programming with JAVA
Object Oriented Programming with JAVA
Demian Antony DMello
 
50 MS Excel Tips and Tricks
50 MS Excel Tips and Tricks
BurCom Consulting Ltd.
 
Waterfall model ppt final
Waterfall model ppt final
shiva krishna
 
androidstudio.pptx
androidstudio.pptx
SundaresanB5
 
Uint-5 Big data Frameworks.pdf
Uint-5 Big data Frameworks.pdf
Sitamarhi Institute of Technology
 
Introduction to Android and Android Studio
Introduction to Android and Android Studio
Suyash Srijan
 
Unit 4- Software Engineering System Model Notes
Unit 4- Software Engineering System Model Notes
arvind pandey
 
Libre Office Impress Lesson 2: Creating a Slide Show
Libre Office Impress Lesson 2: Creating a Slide Show
Smart Chicago Collaborative
 
Engineering Software Products: 4. software architecture
Engineering Software Products: 4. software architecture
software-engineering-book
 
Security & protection in operating system
Security & protection in operating system
Abou Bakr Ashraf
 
Object Oriented Programming with JAVA
Object Oriented Programming with JAVA
Demian Antony DMello
 
Waterfall model ppt final
Waterfall model ppt final
shiva krishna
 
androidstudio.pptx
androidstudio.pptx
SundaresanB5
 
Introduction to Android and Android Studio
Introduction to Android and Android Studio
Suyash Srijan
 

Viewers also liked (20)

Android app development - Java Programming for Android
Android app development - Java Programming for Android
OUM SAOKOSAL
 
Introduction to Advanced Javascript
Introduction to Advanced Javascript
Collaboration Technologies
 
Learning notes of r for python programmer (Temp1)
Learning notes of r for python programmer (Temp1)
Chia-Chi Chang
 
Analysis of Fatal Utah Avalanches with Python. From Scraping, Analysis, to In...
Analysis of Fatal Utah Avalanches with Python. From Scraping, Analysis, to In...
Matt Harrison
 
Meetup Python Nantes - les tests en python
Meetup Python Nantes - les tests en python
Arthur Lutz
 
Python - Lecture 1
Python - Lecture 1
Ravi Kiran Khareedi
 
Operator Overloading
Operator Overloading
Sardar Alam
 
PyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and More
Matt Harrison
 
Installing Python on Mac
Installing Python on Mac
Wei-Wen Hsu
 
Python for All
Python for All
Pragya Goyal
 
Introduction to python
Introduction to python
Yi-Fan Chu
 
Lesson1 python an introduction
Lesson1 python an introduction
Arulalan T
 
Python master class part 1
Python master class part 1
Chathuranga Bandara
 
Introduction to Python - Running Notes
Introduction to Python - Running Notes
RajKumar Rampelli
 
Introduction to facebook java script sdk
Introduction to facebook java script sdk
Yi-Fan Chu
 
Lec02 structures (2)
Lec02 structures (2)
Khuder Altangerel
 
Mastering python lesson2
Mastering python lesson2
Ruth Marvin
 
Introduction to facebook javascript sdk
Introduction to facebook javascript sdk
Yi-Fan Chu
 
Running openCV project on Mac OS
Running openCV project on Mac OS
Wei-Wen Hsu
 
Concise Notes on Python
Concise Notes on Python
Wei-Wen Hsu
 
Android app development - Java Programming for Android
Android app development - Java Programming for Android
OUM SAOKOSAL
 
Learning notes of r for python programmer (Temp1)
Learning notes of r for python programmer (Temp1)
Chia-Chi Chang
 
Analysis of Fatal Utah Avalanches with Python. From Scraping, Analysis, to In...
Analysis of Fatal Utah Avalanches with Python. From Scraping, Analysis, to In...
Matt Harrison
 
Meetup Python Nantes - les tests en python
Meetup Python Nantes - les tests en python
Arthur Lutz
 
Operator Overloading
Operator Overloading
Sardar Alam
 
PyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and More
Matt Harrison
 
Installing Python on Mac
Installing Python on Mac
Wei-Wen Hsu
 
Introduction to python
Introduction to python
Yi-Fan Chu
 
Lesson1 python an introduction
Lesson1 python an introduction
Arulalan T
 
Introduction to Python - Running Notes
Introduction to Python - Running Notes
RajKumar Rampelli
 
Introduction to facebook java script sdk
Introduction to facebook java script sdk
Yi-Fan Chu
 
Mastering python lesson2
Mastering python lesson2
Ruth Marvin
 
Introduction to facebook javascript sdk
Introduction to facebook javascript sdk
Yi-Fan Chu
 
Running openCV project on Mac OS
Running openCV project on Mac OS
Wei-Wen Hsu
 
Concise Notes on Python
Concise Notes on Python
Wei-Wen Hsu
 
Ad

Similar to Java OOP Programming language (Part 1) - Introduction to Java (20)

Introduction_to_Java_Programming_2025.pptx
Introduction_to_Java_Programming_2025.pptx
Yahya NOUALI
 
Introduction to java
Introduction to java
jayc8586
 
01slide
01slide
cdclabs_123
 
01slide
01slide
Usha Sri
 
Servlets and JavaServer Pages (JSP) from the B.Sc. Computer Science and Infor...
Servlets and JavaServer Pages (JSP) from the B.Sc. Computer Science and Infor...
RaguV6
 
PPT 3.pptx For Java.....................
PPT 3.pptx For Java.....................
ayushjaiswal9494
 
Core Java Tutorial
Core Java Tutorial
eMexo Technologies
 
Java
Java
Harry Potter
 
Java
Java
James Wong
 
Java
Java
Tony Nguyen
 
Java
Java
Fraboni Ec
 
Java
Java
Luis Goldster
 
Java
Java
Young Alista
 
what is java.pdf
what is java.pdf
XanGwaps
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdf
AdiseshaK
 
Java technology is widely used currently. Let's start learning of java from b...
Java technology is widely used currently. Let's start learning of java from b...
aliblackcat76
 
Java trainingcourse(1)
Java trainingcourse(1)
Mahadi Hasan
 
Java Programming
Java Programming
Prof. Dr. K. Adisesha
 
What is Java, JDK, JVM, Introduction to Java.pptx
What is Java, JDK, JVM, Introduction to Java.pptx
kumarsuneel3997
 
Java Standard edition(Java ) programming Basics for beginner's
Java Standard edition(Java ) programming Basics for beginner's
momin6
 
Introduction_to_Java_Programming_2025.pptx
Introduction_to_Java_Programming_2025.pptx
Yahya NOUALI
 
Introduction to java
Introduction to java
jayc8586
 
Servlets and JavaServer Pages (JSP) from the B.Sc. Computer Science and Infor...
Servlets and JavaServer Pages (JSP) from the B.Sc. Computer Science and Infor...
RaguV6
 
PPT 3.pptx For Java.....................
PPT 3.pptx For Java.....................
ayushjaiswal9494
 
what is java.pdf
what is java.pdf
XanGwaps
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdf
AdiseshaK
 
Java technology is widely used currently. Let's start learning of java from b...
Java technology is widely used currently. Let's start learning of java from b...
aliblackcat76
 
Java trainingcourse(1)
Java trainingcourse(1)
Mahadi Hasan
 
What is Java, JDK, JVM, Introduction to Java.pptx
What is Java, JDK, JVM, Introduction to Java.pptx
kumarsuneel3997
 
Java Standard edition(Java ) programming Basics for beginner's
Java Standard edition(Java ) programming Basics for beginner's
momin6
 
Ad

More from OUM SAOKOSAL (20)

Class Diagram | OOP and Design Patterns by Oum Saokosal
Class Diagram | OOP and Design Patterns by Oum Saokosal
OUM SAOKOSAL
 
Java OOP Programming language (Part 8) - Java Database JDBC
Java OOP Programming language (Part 8) - Java Database JDBC
OUM SAOKOSAL
 
Java OOP Programming language (Part 7) - Swing
Java OOP Programming language (Part 7) - Swing
OUM SAOKOSAL
 
Java OOP Programming language (Part 6) - Abstract Class & Interface
Java OOP Programming language (Part 6) - Abstract Class & Interface
OUM SAOKOSAL
 
Java OOP Programming language (Part 5) - Inheritance
Java OOP Programming language (Part 5) - Inheritance
OUM SAOKOSAL
 
Java OOP Programming language (Part 4) - Collection
Java OOP Programming language (Part 4) - Collection
OUM SAOKOSAL
 
Java OOP Programming language (Part 3) - Class and Object
Java OOP Programming language (Part 3) - Class and Object
OUM SAOKOSAL
 
Javascript & DOM - Part 1- Javascript Tutorial for Beginners with Examples
Javascript & DOM - Part 1- Javascript Tutorial for Beginners with Examples
OUM SAOKOSAL
 
Aggregate rank bringing order to web sites
Aggregate rank bringing order to web sites
OUM SAOKOSAL
 
How to succeed in graduate school
How to succeed in graduate school
OUM SAOKOSAL
 
Google
Google
OUM SAOKOSAL
 
E miner
E miner
OUM SAOKOSAL
 
Data preparation for mining world wide web browsing patterns (1999)
Data preparation for mining world wide web browsing patterns (1999)
OUM SAOKOSAL
 
Consumer acceptance of online banking an extension of the technology accepta...
Consumer acceptance of online banking an extension of the technology accepta...
OUM SAOKOSAL
 
When Do People Help
When Do People Help
OUM SAOKOSAL
 
Mc Nemar
Mc Nemar
OUM SAOKOSAL
 
Correlation Example
Correlation Example
OUM SAOKOSAL
 
Sem Ski Amos
Sem Ski Amos
OUM SAOKOSAL
 
Sem+Essentials
Sem+Essentials
OUM SAOKOSAL
 
Path Spss Amos (1)
Path Spss Amos (1)
OUM SAOKOSAL
 
Class Diagram | OOP and Design Patterns by Oum Saokosal
Class Diagram | OOP and Design Patterns by Oum Saokosal
OUM SAOKOSAL
 
Java OOP Programming language (Part 8) - Java Database JDBC
Java OOP Programming language (Part 8) - Java Database JDBC
OUM SAOKOSAL
 
Java OOP Programming language (Part 7) - Swing
Java OOP Programming language (Part 7) - Swing
OUM SAOKOSAL
 
Java OOP Programming language (Part 6) - Abstract Class & Interface
Java OOP Programming language (Part 6) - Abstract Class & Interface
OUM SAOKOSAL
 
Java OOP Programming language (Part 5) - Inheritance
Java OOP Programming language (Part 5) - Inheritance
OUM SAOKOSAL
 
Java OOP Programming language (Part 4) - Collection
Java OOP Programming language (Part 4) - Collection
OUM SAOKOSAL
 
Java OOP Programming language (Part 3) - Class and Object
Java OOP Programming language (Part 3) - Class and Object
OUM SAOKOSAL
 
Javascript & DOM - Part 1- Javascript Tutorial for Beginners with Examples
Javascript & DOM - Part 1- Javascript Tutorial for Beginners with Examples
OUM SAOKOSAL
 
Aggregate rank bringing order to web sites
Aggregate rank bringing order to web sites
OUM SAOKOSAL
 
How to succeed in graduate school
How to succeed in graduate school
OUM SAOKOSAL
 
Data preparation for mining world wide web browsing patterns (1999)
Data preparation for mining world wide web browsing patterns (1999)
OUM SAOKOSAL
 
Consumer acceptance of online banking an extension of the technology accepta...
Consumer acceptance of online banking an extension of the technology accepta...
OUM SAOKOSAL
 
When Do People Help
When Do People Help
OUM SAOKOSAL
 
Correlation Example
Correlation Example
OUM SAOKOSAL
 
Path Spss Amos (1)
Path Spss Amos (1)
OUM SAOKOSAL
 

Recently uploaded (20)

Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
10 Key Challenges for AI within the EU Data Protection Framework.pdf
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Priyanka Aash
 
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
yosra Saidani
 
The Growing Value and Application of FME & GenAI
The Growing Value and Application of FME & GenAI
Safe Software
 
Lessons Learned from Developing Secure AI Workflows.pdf
Lessons Learned from Developing Secure AI Workflows.pdf
Priyanka Aash
 
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Safe Software
 
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
 
Daily Lesson Log MATATAG ICT TEchnology 8
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
Python Conference Singapore - 19 Jun 2025
Python Conference Singapore - 19 Jun 2025
ninefyi
 
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
 
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
 
Quantum AI: Where Impossible Becomes Probable
Quantum AI: Where Impossible Becomes Probable
Saikat Basu
 
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
Fwdays
 
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
The Future of Product Management in AI ERA.pdf
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Priyanka Aash
 
Mastering AI Workflows with FME by Mark Döring
Mastering AI Workflows with FME by Mark Döring
Safe Software
 
UserCon Belgium: Honey, VMware increased my bill
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
10 Key Challenges for AI within the EU Data Protection Framework.pdf
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Priyanka Aash
 
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
yosra Saidani
 
The Growing Value and Application of FME & GenAI
The Growing Value and Application of FME & GenAI
Safe Software
 
Lessons Learned from Developing Secure AI Workflows.pdf
Lessons Learned from Developing Secure AI Workflows.pdf
Priyanka Aash
 
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Safe Software
 
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
 
Daily Lesson Log MATATAG ICT TEchnology 8
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
Python Conference Singapore - 19 Jun 2025
Python Conference Singapore - 19 Jun 2025
ninefyi
 
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
 
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
 
Quantum AI: Where Impossible Becomes Probable
Quantum AI: Where Impossible Becomes Probable
Saikat Basu
 
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
Fwdays
 
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
The Future of Product Management in AI ERA.pdf
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Priyanka Aash
 
Mastering AI Workflows with FME by Mark Döring
Mastering AI Workflows with FME by Mark Döring
Safe Software
 
UserCon Belgium: Honey, VMware increased my bill
UserCon Belgium: Honey, VMware increased my bill
stijn40
 

Java OOP Programming language (Part 1) - Introduction to Java

  • 1. Java Programming - Intro Oum Saokosal Master’s Degree in information systems,Jeonju University,South Korea 012 252 752 / 070 252 752 [email protected]
  • 2. Contact Me • Tel: 012 252 752 / 070 252 752 • Email: [email protected] • FB Page: https://facebook.com/kosalgeek • PPT: http://www.slideshare.net/oumsaokosal • YouTube: https://www.youtube.com/user/oumsaokosal • Twitter: https://twitter.com/okosal • Web: http://kosalgeek.com
  • 3. History •JamesGosling and Sun Microsystems •Oak •Java, May 20, 1995, SunWorld •JavaApplet •Java SE,Java EE, Java Java ME •Android uses Java, doesn’t use JVM 3
  • 4. Features of Java • Java is object-oriented • Java is interpreted • Java is architecture-neutral • Java is portable • Java is multithreaded • Java is dynamic 4
  • 5. Java IDETools • Eclipse • Netbeans • IntelliJ IDEA 5
  • 6. Getting Started with Java Programming •A SimpleJavaApplication •Compiling Programs •ExecutingApplications 6
  • 7. A Simple Application Example 1.1 //This application program prints Welcome //to Java! package chapter1; public class Welcome { public static void main(String[] args) { System.out.println("Welcome to Java!"); } } 7
  • 8. ExecutingApplications •Compile: javac Welcome.java •Run: java Welcome.class 8 Java Interpreter on Windows Java Interpreter on Sun Solaris Java Interpreter on Linux Bytecode Java Interpreter on Mac OS
  • 9. Comments In Java,comments: //this is a single line comment /* this is a multiline comment */ 9
  • 10. Reserved Words Reservedwords or keywords: - class - public - static - void - int - package 10
  • 12. Classes A class is a template or blueprint for objects. public class Welcome { } 12
  • 13. Methods Method: a collection of statements that performs a sequence of operations It can be used even without fully understanding the details of how it works. 13
  • 14. main Method The main method provides the control of program flow.The Java interpreter executes the application by invoking the main method. The main method looks like this: public static void main(String[] args) { // Statements; } 14