SlideShare a Scribd company logo
1 of 38
Introduction to
Java Programming
Vibrant Technology & Computers
Vashi,Navi Mumbai
2www.vibranttechnologies.co.in
3www.vibranttechnologies.co.in
4
Introduction
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.
www.vibranttechnologies.co.in
5
Course Objectives
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)
www.vibranttechnologies.co.in
6
Course Objectives, cont.
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
www.vibranttechnologies.co.in
7
Book Chapters
Part I: Fundamentals of Programming
– Chapter 1 Introduction to Java
– Chapter 2 Primitive Data Types and Operations
– Chapter 3 Control Statements
– Chapter 4 Methods
– Chapter 5 Arrays
www.vibranttechnologies.co.in
8
Book Chapters, cont.
Part II: Object-Oriented Programming
– Chapter 6 Objects and Classes
– Chapter 7 Strings
– Chapter 8 Class Inheritance and Interfaces
– Chapter 9 Object-Oriented Software Development
www.vibranttechnologies.co.in
9
Book Chapters, cont.
Part III: GUI Programming
– Chapter 10 Getting Started with GUI Programming
– Chapter 11 Creating User Interfaces
– Chapter 12 Applets and Advanced GUI
www.vibranttechnologies.co.in
10
Book Chapters, cont.
Part IV: Developing Comprehensive Projects
– Chapter 13 Exception Handling
– Chapter 14 Internationalization
– Chapter 15 Multithreading
– Chapter 16 Multimedia
– Chapter 17 Input and Output
– Chapter 18 Networking
– Chapter 19 Java Data Structures
www.vibranttechnologies.co.in
11
Chapter 1 Introduction to Java
and Forte
What Is Java?
Getting Started With Java Programming
– Create, Compile and Running a Java
Application
www.vibranttechnologies.co.in
12
What Is Java?
History
Characteristics of Java
www.vibranttechnologies.co.in
13
History
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)
www.vibranttechnologies.co.in
14
Characteristics of Java
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
www.vibranttechnologies.co.in
15
JDK Versions
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)
www.vibranttechnologies.co.in
16
JDK Editions
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.
www.vibranttechnologies.co.in
17
Java IDE Tools
Forte by Sun MicroSystems
Borland JBuilder
Microsoft Visual J++
WebGain Café
IBM Visual Age for Java
www.vibranttechnologies.co.in
18
Getting Started with Java
Programming
A Simple Java Application
Compiling Programs
Executing Applications
www.vibranttechnologies.co.in
19
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!");
}
}
RunRunSourceSource
NOTE: To run the program,
install slide files on hard
disk.www.vibranttechnologies.co.in
20
Creating and Compiling Programs
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
www.vibranttechnologies.co.in
21
Executing Applications
On command line
– java classname
Java
Interpreter
on Windows
Java
Interpreter
on Sun Solaris
Java
Interpreter
on Linux
Bytecode
...
www.vibranttechnologies.co.in
22
Example
javac Welcome.java
java Welcome
output:...
www.vibranttechnologies.co.in
23
Compiling and Running a Program
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~
www.vibranttechnologies.co.in
24
Anatomy of a Java Program
Comments
Package
Reserved words
Modifiers
Statements
Blocks
Classes
Methods
The main method
www.vibranttechnologies.co.in
25
Comments
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 /*,
www.vibranttechnologies.co.in
26
Package
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.
www.vibranttechnologies.co.in
27
Reserved Words
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
www.vibranttechnologies.co.in
28
Modifiers
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."www.vibranttechnologies.co.in
29
Statements
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 withwww.vibranttechnologies.co.in
30
Blocks
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
www.vibranttechnologies.co.in
31
Classes
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 awww.vibranttechnologies.co.in
32
Methods
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 awww.vibranttechnologies.co.in
33
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) { www.vibranttechnologies.co.in
34
Displaying Text in a Message
Dialog Box
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
www.vibranttechnologies.co.in
35
The showMessageDialog Method
JOptionPane.showMessageDialog(null, "Welcome
to Java!",
"Example 1.2",
JOptionPane.INFORMATION_MESSAGE));
www.vibranttechnologies.co.in
36
The exit Method
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.
www.vibranttechnologies.co.in
37www.vibranttechnologies.co.in
Thank You…
38www.vibranttechnologies.co.in

More Related Content

What's hot

Introduction to java
Introduction to javaIntroduction to java
Introduction to javajayc8586
 
bai giang java co ban - java cơ bản - bai 1
bai giang java co ban - java cơ bản - bai 1bai giang java co ban - java cơ bản - bai 1
bai giang java co ban - java cơ bản - bai 1ifis
 
JAVA Training Syllabus Course
JAVA Training Syllabus CourseJAVA Training Syllabus Course
JAVA Training Syllabus CourseTOPS Technologies
 
CR Bridge Solutions Pvt Ltd. Java slides
CR Bridge Solutions Pvt Ltd. Java slidesCR Bridge Solutions Pvt Ltd. Java slides
CR Bridge Solutions Pvt Ltd. Java slidesCRBTech
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javashwanjava
 
Summer training report on java se6 technology
Summer training  report on java se6 technologySummer training  report on java se6 technology
Summer training report on java se6 technologyShamsher Ahmed
 
Core Java Slides
Core Java SlidesCore Java Slides
Core Java SlidesVinit Vyas
 
Structure programming – Java Programming – Theory
Structure programming – Java Programming – TheoryStructure programming – Java Programming – Theory
Structure programming – Java Programming – TheoryOXUS 20
 

What's hot (18)

Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
bai giang java co ban - java cơ bản - bai 1
bai giang java co ban - java cơ bản - bai 1bai giang java co ban - java cơ bản - bai 1
bai giang java co ban - java cơ bản - bai 1
 
Core java tutorial
Core java tutorialCore java tutorial
Core java tutorial
 
Java Programming Basics
Java Programming BasicsJava Programming Basics
Java Programming Basics
 
JAVA Training Syllabus Course
JAVA Training Syllabus CourseJAVA Training Syllabus Course
JAVA Training Syllabus Course
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
CR Bridge Solutions Pvt Ltd. Java slides
CR Bridge Solutions Pvt Ltd. Java slidesCR Bridge Solutions Pvt Ltd. Java slides
CR Bridge Solutions Pvt Ltd. Java slides
 
Bn1005 demo ppt core java
Bn1005 demo ppt core javaBn1005 demo ppt core java
Bn1005 demo ppt core java
 
Curso de Programación Java Intermedio
Curso de Programación Java IntermedioCurso de Programación Java Intermedio
Curso de Programación Java Intermedio
 
Curso de Programación Java Básico
Curso de Programación Java BásicoCurso de Programación Java Básico
Curso de Programación Java Básico
 
Core java course syllabus
Core java course syllabusCore java course syllabus
Core java course syllabus
 
Java exam 2017
Java exam 2017Java exam 2017
Java exam 2017
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Summer training report on java se6 technology
Summer training  report on java se6 technologySummer training  report on java se6 technology
Summer training report on java se6 technology
 
Core Java Training report
Core Java Training reportCore Java Training report
Core Java Training report
 
Core Java Slides
Core Java SlidesCore Java Slides
Core Java Slides
 
130700548484460000
130700548484460000130700548484460000
130700548484460000
 
Structure programming – Java Programming – Theory
Structure programming – Java Programming – TheoryStructure programming – Java Programming – Theory
Structure programming – Java Programming – Theory
 

Viewers also liked

Drupal Updates automatisieren - Gut oder Böse?
Drupal Updates automatisieren - Gut oder Böse?Drupal Updates automatisieren - Gut oder Böse?
Drupal Updates automatisieren - Gut oder Böse?Daniel Andrisek
 
Gcc para plataformawindows
Gcc para plataformawindowsGcc para plataformawindows
Gcc para plataformawindowsGustavo Reina
 
Ania Jaworska Sou Fujimoto Object Design Midterm
Ania Jaworska Sou Fujimoto Object Design MidtermAnia Jaworska Sou Fujimoto Object Design Midterm
Ania Jaworska Sou Fujimoto Object Design MidtermLouisa Rulin
 
Executive Compensation HRMG 725
Executive Compensation HRMG 725Executive Compensation HRMG 725
Executive Compensation HRMG 725Stephen Burgor
 
Manuale di posa per rivestimento parete Novowood legno composito
Manuale di posa per rivestimento parete Novowood legno compositoManuale di posa per rivestimento parete Novowood legno composito
Manuale di posa per rivestimento parete Novowood legno compositoNovowood
 
Exterior renderings WIP
Exterior renderings WIPExterior renderings WIP
Exterior renderings WIPKen Wong
 
The Ethical Practices of Tourists in Callao Cave
The Ethical Practices of Tourists in Callao CaveThe Ethical Practices of Tourists in Callao Cave
The Ethical Practices of Tourists in Callao CaveRoy Vincent Abad
 
Gcc para plataformawindows
Gcc para plataformawindowsGcc para plataformawindows
Gcc para plataformawindowsGustavo Reina
 
10 Tips to Improve Testing
10 Tips to Improve Testing10 Tips to Improve Testing
10 Tips to Improve TestingJen Boland
 
Pick and place mechanism
Pick and place mechanismPick and place mechanism
Pick and place mechanismJakshil Gandhi
 
Geografiya expres pidgotovka_litera_2012
Geografiya expres pidgotovka_litera_2012Geografiya expres pidgotovka_litera_2012
Geografiya expres pidgotovka_litera_2012windof
 

Viewers also liked (16)

Drupal Updates automatisieren - Gut oder Böse?
Drupal Updates automatisieren - Gut oder Böse?Drupal Updates automatisieren - Gut oder Böse?
Drupal Updates automatisieren - Gut oder Böse?
 
Gcc para plataformawindows
Gcc para plataformawindowsGcc para plataformawindows
Gcc para plataformawindows
 
Ania Jaworska Sou Fujimoto Object Design Midterm
Ania Jaworska Sou Fujimoto Object Design MidtermAnia Jaworska Sou Fujimoto Object Design Midterm
Ania Jaworska Sou Fujimoto Object Design Midterm
 
Executive Compensation HRMG 725
Executive Compensation HRMG 725Executive Compensation HRMG 725
Executive Compensation HRMG 725
 
Portada
PortadaPortada
Portada
 
Manuale di posa per rivestimento parete Novowood legno composito
Manuale di posa per rivestimento parete Novowood legno compositoManuale di posa per rivestimento parete Novowood legno composito
Manuale di posa per rivestimento parete Novowood legno composito
 
Exterior renderings WIP
Exterior renderings WIPExterior renderings WIP
Exterior renderings WIP
 
Centos+5+espa c3 b1ol
Centos+5+espa c3 b1olCentos+5+espa c3 b1ol
Centos+5+espa c3 b1ol
 
The Ethical Practices of Tourists in Callao Cave
The Ethical Practices of Tourists in Callao CaveThe Ethical Practices of Tourists in Callao Cave
The Ethical Practices of Tourists in Callao Cave
 
Gcc para plataformawindows
Gcc para plataformawindowsGcc para plataformawindows
Gcc para plataformawindows
 
Newsletter
NewsletterNewsletter
Newsletter
 
Segunda expo
Segunda expoSegunda expo
Segunda expo
 
10 Tips to Improve Testing
10 Tips to Improve Testing10 Tips to Improve Testing
10 Tips to Improve Testing
 
Pick and place mechanism
Pick and place mechanismPick and place mechanism
Pick and place mechanism
 
Sofia y julian
Sofia y julianSofia y julian
Sofia y julian
 
Geografiya expres pidgotovka_litera_2012
Geografiya expres pidgotovka_litera_2012Geografiya expres pidgotovka_litera_2012
Geografiya expres pidgotovka_litera_2012
 

Similar to Java course-in-mumbai

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'smomin6
 
Java course-in-mumbai
Java course-in-mumbaiJava course-in-mumbai
Java course-in-mumbaiUnmesh Baile
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_javaHarry Potter
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingJames Wong
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_javaHoang Nguyen
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_javaTony Nguyen
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingYoung Alista
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingFraboni Ec
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingLuis Goldster
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdfAdiseshaK
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javaSteve Fort
 
Introducción a la progrogramación orientada a objetos con Java
Introducción a la progrogramación orientada a objetos con JavaIntroducción a la progrogramación orientada a objetos con Java
Introducción a la progrogramación orientada a objetos con JavaFacultad de Ciencias y Sistemas
 
Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Mr. Akaash
 
JAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxJAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxDrPreethiD1
 
Elements of Java Language
Elements of Java Language Elements of Java Language
Elements of Java Language Hitesh-Java
 

Similar to Java course-in-mumbai (20)

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
 
01slide
01slide01slide
01slide
 
Java course-in-mumbai
Java course-in-mumbaiJava course-in-mumbai
Java course-in-mumbai
 
Ch2
Ch2Ch2
Ch2
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdf
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Java introduction
Java introductionJava introduction
Java introduction
 
Introducción a la progrogramación orientada a objetos con Java
Introducción a la progrogramación orientada a objetos con JavaIntroducción a la progrogramación orientada a objetos con Java
Introducción a la progrogramación orientada a objetos con Java
 
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...
 
JAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxJAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptx
 
Elements of Java Language
Elements of Java Language Elements of Java Language
Elements of Java Language
 

Recently uploaded

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Recently uploaded (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

Java course-in-mumbai

  • 1. Introduction to Java Programming Vibrant Technology & Computers Vashi,Navi Mumbai
  • 4. 4 Introduction 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. www.vibranttechnologies.co.in
  • 5. 5 Course Objectives 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) www.vibranttechnologies.co.in
  • 6. 6 Course Objectives, cont. 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 www.vibranttechnologies.co.in
  • 7. 7 Book Chapters Part I: Fundamentals of Programming – Chapter 1 Introduction to Java – Chapter 2 Primitive Data Types and Operations – Chapter 3 Control Statements – Chapter 4 Methods – Chapter 5 Arrays www.vibranttechnologies.co.in
  • 8. 8 Book Chapters, cont. Part II: Object-Oriented Programming – Chapter 6 Objects and Classes – Chapter 7 Strings – Chapter 8 Class Inheritance and Interfaces – Chapter 9 Object-Oriented Software Development www.vibranttechnologies.co.in
  • 9. 9 Book Chapters, cont. Part III: GUI Programming – Chapter 10 Getting Started with GUI Programming – Chapter 11 Creating User Interfaces – Chapter 12 Applets and Advanced GUI www.vibranttechnologies.co.in
  • 10. 10 Book Chapters, cont. Part IV: Developing Comprehensive Projects – Chapter 13 Exception Handling – Chapter 14 Internationalization – Chapter 15 Multithreading – Chapter 16 Multimedia – Chapter 17 Input and Output – Chapter 18 Networking – Chapter 19 Java Data Structures www.vibranttechnologies.co.in
  • 11. 11 Chapter 1 Introduction to Java and Forte What Is Java? Getting Started With Java Programming – Create, Compile and Running a Java Application www.vibranttechnologies.co.in
  • 12. 12 What Is Java? History Characteristics of Java www.vibranttechnologies.co.in
  • 13. 13 History 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) www.vibranttechnologies.co.in
  • 14. 14 Characteristics of Java 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 www.vibranttechnologies.co.in
  • 15. 15 JDK Versions 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) www.vibranttechnologies.co.in
  • 16. 16 JDK Editions 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. www.vibranttechnologies.co.in
  • 17. 17 Java IDE Tools Forte by Sun MicroSystems Borland JBuilder Microsoft Visual J++ WebGain Café IBM Visual Age for Java www.vibranttechnologies.co.in
  • 18. 18 Getting Started with Java Programming A Simple Java Application Compiling Programs Executing Applications www.vibranttechnologies.co.in
  • 19. 19 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!"); } } RunRunSourceSource NOTE: To run the program, install slide files on hard disk.www.vibranttechnologies.co.in
  • 20. 20 Creating and Compiling Programs 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 www.vibranttechnologies.co.in
  • 21. 21 Executing Applications On command line – java classname Java Interpreter on Windows Java Interpreter on Sun Solaris Java Interpreter on Linux Bytecode ... www.vibranttechnologies.co.in
  • 23. 23 Compiling and Running a Program 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~ www.vibranttechnologies.co.in
  • 24. 24 Anatomy of a Java Program Comments Package Reserved words Modifiers Statements Blocks Classes Methods The main method www.vibranttechnologies.co.in
  • 25. 25 Comments 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 /*, www.vibranttechnologies.co.in
  • 26. 26 Package 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. www.vibranttechnologies.co.in
  • 27. 27 Reserved Words 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 www.vibranttechnologies.co.in
  • 28. 28 Modifiers 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."www.vibranttechnologies.co.in
  • 29. 29 Statements 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 withwww.vibranttechnologies.co.in
  • 30. 30 Blocks 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 www.vibranttechnologies.co.in
  • 31. 31 Classes 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 awww.vibranttechnologies.co.in
  • 32. 32 Methods 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 awww.vibranttechnologies.co.in
  • 33. 33 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) { www.vibranttechnologies.co.in
  • 34. 34 Displaying Text in a Message Dialog Box 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 www.vibranttechnologies.co.in
  • 35. 35 The showMessageDialog Method JOptionPane.showMessageDialog(null, "Welcome to Java!", "Example 1.2", JOptionPane.INFORMATION_MESSAGE)); www.vibranttechnologies.co.in
  • 36. 36 The exit Method 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. www.vibranttechnologies.co.in

Editor's Notes

  1. 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.