SlideShare a Scribd company logo
Welcome
to
vibrant technology &
computers
www.vibranttechnologies.co.in1
VibrantTechnology & Computers
Vashi,Navi Mumbai
Introduction to
Java Programming
www.vibranttechnologies.co.in3
www.vibranttechnologies.co.in4
Introduction
www.vibranttechnologies.co.in5
 Java is a programming language and computing platform first released by Sun
Microsystems in 1995. There are lots of applications and websites that will not
work unless you have Java installed, and more are created every day. Java is fast,
secure, and reliable.
 From laptops to datacenters, game consoles to scientific supercomputers, cell
phones to the Internet, Java is everywhere!
 Java allows you to play online games, chat with people around the world,
calculate your mortgage interest, and view images in 3D, just to name a few.
 It's also integral to the intranet applications and other e-business solutions that
are the foundation of corporate computing.
Course Objectives
www.vibranttechnologies.co.in6
Upon completing the course, you will understand
Create, compile, and run Java programs
Primitive data types
Java control flow
Methods
Arrays (for teaching Java in two semesters, this could be the end)
Object-oriented programming
Core Java classes (Swing, exception, internationalization,
multithreading, multimedia, I/O, networking, Java Collections
Framework)
Course Objectives, cont.
www.vibranttechnologies.co.in7
You will be able to
Develop programs using Forte
Write simple programs using primitive data types, control
statements, methods, and arrays.
Create and use methods
Develop a GUI interface and Java applets
Write interesting projects
Establish a firm foundation on Java concepts
Introduction to Java
www.vibranttechnologies.co.in8
What Is Java?
Getting Started With Java Programming
Create, Compile and Running a Java Application
What Is Java?
www.vibranttechnologies.co.in9
History
Characteristics of Java
History
www.vibranttechnologies.co.in10
James Gosling and Sun Microsystems
Oak
Java, May 20, 1995, Sun World
HotJava
The first Java-enabled Web browser
JDK Evolutions
J2SE, J2ME, and J2EE (not mentioned in the book, but could
discuss here optionally)
Characteristics of Java
www.vibranttechnologies.co.in11
 Java is simple
 Java is object-oriented
 Java is distributed
 Java is interpreted
 Java is robust
 Java is secure
 Java is architecture-neutral
 Java is portable
 Java’s performance
 Java is multithreaded
 Java is dynamic
JDK Versions
www.vibranttechnologies.co.in12
JDK 1.02 (1995)
JDK 1.1 (1996)
Java 2 SDK v 1.2 (a.k.a JDK 1.2, 1998)
Java 2 SDK v 1.3 (a.k.a JDK 1.3, 2000)
Java 2 SDK v 1.4 (a.k.a JDK 1.4, 2002)
JDK Editions
www.vibranttechnologies.co.in13
Java Standard Edition (J2SE)
J2SE can be used to develop client-side standalone
applications or applets.
Java Enterprise Edition (J2EE)
J2EE can be used to develop server-side applications
such as Java servlets and Java ServerPages.
Java Micro Edition (J2ME).
J2ME can be used to develop applications for mobile
devices such as cell phones.
This book uses J2SE to introduce Java
programming.
Java IDE Tools
www.vibranttechnologies.co.in14
Forte by Sun MicroSystems
Borland JBuilder
Microsoft Visual J++
WebGain Café
IBM Visual Age for Java
Getting Started with Java
Programming
www.vibranttechnologies.co.in15
A Simple Java Application
Compiling Programs
Executing Applications
A Simple Application
www.vibranttechnologies.co.in16
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!");
}
}
RunRunSourceSource
NOTE: To run the program,
install slide files on hard
disk.
Creating and Compiling Programs
www.vibranttechnologies.co.in17
On command line
javac file.java
Source Code
Create/Modify Source Code
Compile Source Code
i.e. javac Welcome.java
Bytecode
Run Byteode
i.e. java Welcome
Result
If compilation errors
If runtime errors or incorrect result
Executing Applications
www.vibranttechnologies.co.in18
On command line
java classname
Java
Interpreter
on Windows
Java
Interpreter
on Sun Solaris
Java
Interpreter
on Linux
Bytecode
...
Example
www.vibranttechnologies.co.in19
javac Welcome.java
java Welcome
output:...
Compiling and Running a Program
www.vibranttechnologies.co.in20
Where are the files
stored in the
directory?c:example
chapter1 Welcome.class
Welcome.java
chapter2
.
.
.
Java source files and class files for Chapter 2
chapter19 Java source files and class files for Chapter 19
Welcome.java~
Anatomy of a Java Program
www.vibranttechnologies.co.in21
Comments
Package
Reserved words
Modifiers
Statements
Blocks
Classes
Methods
The main method
Comments
www.vibranttechnologies.co.in22
In Java, comments are
preceded by two slashes (//)
in a line, or enclosed
between /* and */ in one or
multiple lines. When the
compiler sees //, it ignores
all text after // in the
same line. When it sees /*,
Package
www.vibranttechnologies.co.in23
The second line in the program
(package chapter1;) specifies a package
name, chapter1, for the class Welcome.
Forte compiles the source code in
Welcome.java, generates
Welcome.class, and stores
Welcome.class in the chapter1 folder.
Reserved Words
www.vibranttechnologies.co.in24
Reserved words or keywords are
words that have a specific
meaning to the compiler and
cannot be used for other
purposes in the program. For
example, when the compiler sees
the word class, it understands
that the word after class is the
name for the class. Other
reserved words in Example 1.1
are public, static, and void.
Their use will be introduced
Modifiers
www.vibranttechnologies.co.in25
Java uses certain reserved words called
modifiers that specify the properties of the
data, methods, and classes and how they
can be used. Examples of modifiers are
public and static. Other modifiers are
private, final, abstract, and protected. A
public datum, method, or class can be
accessed by other programs. A private
datum or method cannot be accessed by
other programs. Modifiers are discussed in
Chapter 6, "Objects and Classes."
Statements
www.vibranttechnologies.co.in26
A statement represents an
action or a sequence of
actions. The statement
System.out.println("Welcome
to Java!") in the program in
Example 1.1 is a statement
to display the greeting
"Welcome to Java!" Every
statement in Java ends with
Blocks
www.vibranttechnologies.co.in27
A pair of braces in a program
forms a block that groups
components of a program.
public class Test {
public static void main(String[] args) {
System.out.println("Welcome to Java!");
}
}
Class block
Method block
Classes
www.vibranttechnologies.co.in28
The class is the essential Java
construct. A class is a template
or blueprint for objects. To
program in Java, you must
understand classes and be able
to write and use them. The
mystery of the class will
continue to be unveiled
throughout this book. For now,
though, understand that a
Methods
www.vibranttechnologies.co.in29
What is System.out.println? It is a method: a
collection of statements that performs a
sequence of operations to display a
message on the console. It can be used
even without fully understanding the
details of how it works. It is used by
invoking a statement with a string
argument. The string argument is enclosed
within parentheses. In this case, the
argument is "Welcome to Java!" You can
call the same println method with a
different argument to print a different
message.
main Method
www.vibranttechnologies.co.in30
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) {
Displaying Text in a Message
Dialog Box
www.vibranttechnologies.co.in31
you can use the showMessageDialog method
in the JOptionPane class. JOptionPane is
one of the many predefined classes in the
Java system, which can be reused rather
than “reinventing the wheel.”
RunRunSourceSource
The showMessageDialog Method
www.vibranttechnologies.co.in32
JOptionPane.showMessageDialog(null, "Welcome to
Java!",
"Example 1.2",
JOptionPane.INFORMATION_MESSAGE));
The exit Method
www.vibranttechnologies.co.in33
Use Exit to terminate the program and stop all
threads.
NOTE: When your program starts, a thread is
spawned to run the program. When the
showMessageDialog is invoked, a separate thread
is spawned to run this method. The thread is not
terminated even you close the dialog box. To
terminate the thread, you have to invoke the exit
method.
Thank You…
www.vibranttechnologies.co.in34

More Related Content

PDF
Professional-core-java-training
PDF
Java exam 2017
PPTX
Core JAVA presentation for 1st year students
PPTX
Java seminar
PPT
Classes and Objects
PDF
Introduction to Java Programming Language
PPSX
CR Bridge Solutions Pvt Ltd. Java slides
Professional-core-java-training
Java exam 2017
Core JAVA presentation for 1st year students
Java seminar
Classes and Objects
Introduction to Java Programming Language
CR Bridge Solutions Pvt Ltd. Java slides

What's hot (19)

PDF
Java Programming Basics
DOCX
JAVA CORE
PPT
Top 10 Interview Questions For Java
PPTX
Java Programming
PPT
Java course-in-mumbai
PPSX
Java Semimar Slide (Cetpa)
PDF
A seminar report on core java
DOC
Grade 8: Introduction To Java
PPS
Java session01
PPT
Java for Recruiters
PDF
(Ebook pdf) java programming language basics
DOCX
Design pattern application
PPT
8 most expected java interview questions
PDF
Applying Anti-Reversing Techniques to Java Bytecode
PPTX
Java programming language
PDF
Summer training report on java se6 technology
PDF
Bn1005 demo ppt core java
PDF
C# Interview Questions | Edureka
Java Programming Basics
JAVA CORE
Top 10 Interview Questions For Java
Java Programming
Java course-in-mumbai
Java Semimar Slide (Cetpa)
A seminar report on core java
Grade 8: Introduction To Java
Java session01
Java for Recruiters
(Ebook pdf) java programming language basics
Design pattern application
8 most expected java interview questions
Applying Anti-Reversing Techniques to Java Bytecode
Java programming language
Summer training report on java se6 technology
Bn1005 demo ppt core java
C# Interview Questions | Edureka
Ad

Viewers also liked (17)

PPT
Section 30 1 moving toward conflict
PDF
FINALBOTDRAFT28
PDF
Web_Annual Report
PDF
OECD Public Governance Ministerial Meeting 2015 - Chair's summary
PPTX
Astbarrier pbxware.ru статистика и отчетность для gsm шлагбаума
PDF
Kode etik
PPTX
עמותת והדרת
PPT
Remote and Waveform
PPTX
Heybe Pentest Automation Toolkit - Sec4U
PPTX
26 oct
PDF
Nav.resume2013
DOCX
VICKY SINGH-Final
DOCX
SRIDHAR_CV
PPTX
What is engineering
PDF
InCites for publishers Frankfurt Book Fair 2015
PDF
Investing in specialised services - the prioritisation framework, pop up uni,...
PPTX
пакет вер 13.0
Section 30 1 moving toward conflict
FINALBOTDRAFT28
Web_Annual Report
OECD Public Governance Ministerial Meeting 2015 - Chair's summary
Astbarrier pbxware.ru статистика и отчетность для gsm шлагбаума
Kode etik
עמותת והדרת
Remote and Waveform
Heybe Pentest Automation Toolkit - Sec4U
26 oct
Nav.resume2013
VICKY SINGH-Final
SRIDHAR_CV
What is engineering
InCites for publishers Frankfurt Book Fair 2015
Investing in specialised services - the prioritisation framework, pop up uni,...
пакет вер 13.0
Ad

Similar to Professional-core-java-training (20)

PPT
Java course-in-mumbai
PPT
Java intro
PPT
01slide
PPT
Core java-introduction
PPT
01slide
PPT
01slide
PPT
01slide (1)ffgfefge
PPTX
Unit1 introduction to Java
PPT
Java Standard edition(Java ) programming Basics for beginner's
PPTX
Object oriented programming-with_java
PPTX
Object oriented programming
PPTX
Object oriented programming-with_java
PPTX
Object oriented programming
PPTX
Object oriented programming
PPTX
Object oriented programming
PPTX
Object oriented programming-with_java
PDF
Java chapter 1
PPT
Basics of java 1
PPTX
Java ms harsha
PDF
Top 10 Important Core Java Interview questions and answers.pdf
Java course-in-mumbai
Java intro
01slide
Core java-introduction
01slide
01slide
01slide (1)ffgfefge
Unit1 introduction to Java
Java Standard edition(Java ) programming Basics for beginner's
Object oriented programming-with_java
Object oriented programming
Object oriented programming-with_java
Object oriented programming
Object oriented programming
Object oriented programming
Object oriented programming-with_java
Java chapter 1
Basics of java 1
Java ms harsha
Top 10 Important Core Java Interview questions and answers.pdf

More from Vibrant Technologies & Computers (20)

PPT
Buisness analyst business analysis overview ppt 5
PPT
SQL Introduction to displaying data from multiple tables
PPT
SQL- Introduction to MySQL
PPT
SQL- Introduction to SQL database
PPT
ITIL - introduction to ITIL
PPT
Salesforce - Introduction to Security & Access
PPT
Data ware housing- Introduction to olap .
PPT
Data ware housing - Introduction to data ware housing process.
PPT
Data ware housing- Introduction to data ware housing
PPT
Salesforce - classification of cloud computing
PPT
Salesforce - cloud computing fundamental
PPT
SQL- Introduction to PL/SQL
PPT
SQL- Introduction to advanced sql concepts
PPT
SQL Inteoduction to SQL manipulating of data
PPT
SQL- Introduction to SQL Set Operations
PPT
Sas - Introduction to designing the data mart
PPT
Sas - Introduction to working under change management
PPT
SAS - overview of SAS
PPT
Teradata - Architecture of Teradata
PPT
Teradata - Restoring Data
Buisness analyst business analysis overview ppt 5
SQL Introduction to displaying data from multiple tables
SQL- Introduction to MySQL
SQL- Introduction to SQL database
ITIL - introduction to ITIL
Salesforce - Introduction to Security & Access
Data ware housing- Introduction to olap .
Data ware housing - Introduction to data ware housing process.
Data ware housing- Introduction to data ware housing
Salesforce - classification of cloud computing
Salesforce - cloud computing fundamental
SQL- Introduction to PL/SQL
SQL- Introduction to advanced sql concepts
SQL Inteoduction to SQL manipulating of data
SQL- Introduction to SQL Set Operations
Sas - Introduction to designing the data mart
Sas - Introduction to working under change management
SAS - overview of SAS
Teradata - Architecture of Teradata
Teradata - Restoring Data

Recently uploaded (20)

PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
observCloud-Native Containerability and monitoring.pptx
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Getting Started with Data Integration: FME Form 101
PDF
Hybrid model detection and classification of lung cancer
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
August Patch Tuesday
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
observCloud-Native Containerability and monitoring.pptx
Module 1.ppt Iot fundamentals and Architecture
NewMind AI Weekly Chronicles – August ’25 Week III
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Zenith AI: Advanced Artificial Intelligence
Getting Started with Data Integration: FME Form 101
Hybrid model detection and classification of lung cancer
Enhancing emotion recognition model for a student engagement use case through...
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
A novel scalable deep ensemble learning framework for big data classification...
Getting started with AI Agents and Multi-Agent Systems
Assigned Numbers - 2025 - Bluetooth® Document
Developing a website for English-speaking practice to English as a foreign la...
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
DP Operators-handbook-extract for the Mautical Institute
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Final SEM Unit 1 for mit wpu at pune .pptx
August Patch Tuesday
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf

Professional-core-java-training

Editor's Notes

  • #3: First Class: Introduction, Prerequisites, Advices, Syllabus Lab 1: Create a Java Project, Compile, and Run. Show syntax errors Print program Capture screen shots, and save it in Word, and print it. Homework One: Check in the class randomly.