SlideShare une entreprise Scribd logo
1  sur  36
WELCOME
TO
VIBRANT TECHNOLOGY &
COMPUTERS
WWW.VIBRANTTECHNOLOGIES.CO.IN 1
INTRODUCTION TO
JAVA PROGRAMMINGVIBRANT TECHNOLOGY & COMPUTERS
VASHI,NAVI MUMBAI
WWW.VIBRANTTECHNOLOGIES.CO.IN 3
WWW.VIBRANTTECHNOLOGIES.CO.IN 4
CONTENT:
1.HISTROY OF JAVA
2.CHARACTERISTICS OF JAVA
3.JDK VERSIONS
17.EXIT METHOD4.JDK EDITIONS
5.JAVA IDE TOOLS
6.GETTING START WITH JAVA
7.SIMPLE APPLICATIONS
8.CREATING AND COMPLILING PROGRAMS
9.ANATOMY OF JAVA PROGRAMS
10.COMMENTS
11.PACKAGES
12.STATEMENTS
13.BLOCKS
14.CLASSES
15.METHODS
16.MAIN METHODS
WWW.VIBRANTTECHNOLOGIES.CO.IN 5
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 6
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 7
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 8
INTRODUCTION TO JAVA
What Is Java?
Getting Started With Java Programming
 Create, Compile and Running a Java Application
WWW.VIBRANTTECHNOLOGIES.CO.IN 9
WHAT IS JAVA?
History
Characteristics of Java
WWW.VIBRANTTECHNOLOGIES.CO.IN 10
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 11
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 12
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 13
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 14
JAVA IDE TOOLS
Forte by Sun MicroSystems
Borland JBuilder
Microsoft Visual J++
WebGain Café
IBM Visual Age for Java
WWW.VIBRANTTECHNOLOGIES.CO.IN 15
GETTING STARTED WITH JAVA
PROGRAMMING
A Simple Java Application
Compiling Programs
Executing Applications
WWW.VIBRANTTECHNOLOGIES.CO.IN 16
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!");
}
}
WWW.VIBRANTTECHNOLOGIES.CO.IN 17
RunRunSourceSource
NOTE: To run the program,
install slide files on hard
disk.
CREATING AND COMPILING PROGRAMS
On command line
javac file.java
WWW.VIBRANTTECHNOLOGIES.CO.IN 18
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
On command line
java classname
WWW.VIBRANTTECHNOLOGIES.CO.IN 19
Java
Interpreter
on Windows
Java
Interpreter
on Sun Solaris
Java
Interpreter
on Linux
Bytecode
...
EXAMPLE
javac Welcome.java
java Welcome
output:...
WWW.VIBRANTTECHNOLOGIES.CO.IN 20
COMPILING AND RUNNING A
PROGRAM
WWW.VIBRANTTECHNOLOGIES.CO.IN 21
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
Comments
Package
Reserved words
Modifiers
Statements
Blocks
Classes
Methods
The main method
WWW.VIBRANTTECHNOLOGIES.CO.IN 22
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 /*,
it scans for the next */ andWWW.VIBRANTTECHNOLOGIES.CO.IN 23
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 24
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
are public, static, and void.
Their use will be introduced
WWW.VIBRANTTECHNOLOGIES.CO.IN 25
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 26
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 with
a semicolon (;).
WWW.VIBRANTTECHNOLOGIES.CO.IN 27
BLOCKS
WWW.VIBRANTTECHNOLOGIES.CO.IN 28
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
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
program is defined by using one
WWW.VIBRANTTECHNOLOGIES.CO.IN 29
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 a different
argument to print a different message.
WWW.VIBRANTTECHNOLOGIES.CO.IN 30
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; WWW.VIBRANTTECHNOLOGIES.CO.IN 31
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.” WWW.VIBRANTTECHNOLOGIES.CO.IN 32
RunRunSourceSource
THE SHOWMESSAGEDIALOG METHOD
JOptionPane.showMessageDialog(null, "Welcome to
Java!",
"Example 1.2",
JOptionPane.INFORMATION_MESSAGE));
WWW.VIBRANTTECHNOLOGIES.CO.IN 33
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 theWWW.VIBRANTTECHNOLOGIES.CO.IN 34
WWW.VIBRANTTECHNOLOGIES.CO.IN 35
THANK YOU…
WWW.VIBRANTTECHNOLOGIES.CO.IN 36

Contenu connexe

Tendances

Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)Pratima Parida
 
Making Applications Work Together In Eclipse
Making Applications Work Together In EclipseMaking Applications Work Together In Eclipse
Making Applications Work Together In EclipseKaniska Mandal
 
Java Lecture 1
Java Lecture 1Java Lecture 1
Java Lecture 1Qualys
 
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
 
Gwt and JSR 269's Pluggable Annotation Processing API
Gwt and JSR 269's Pluggable Annotation Processing APIGwt and JSR 269's Pluggable Annotation Processing API
Gwt and JSR 269's Pluggable Annotation Processing APIArnaud Tournier
 
java tutorial for beginner - Free Download
java tutorial for beginner - Free Downloadjava tutorial for beginner - Free Download
java tutorial for beginner - Free DownloadTIB Academy
 
Features of java unit 1
Features of java unit 1Features of java unit 1
Features of java unit 1RubaNagarajan
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruitersph7 -
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javaSaba Ameer
 
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
 
Learn java in hindi
Learn java in hindiLearn java in hindi
Learn java in hindiVipin sharma
 
(Ebook pdf) java programming language basics
(Ebook pdf)   java programming language basics(Ebook pdf)   java programming language basics
(Ebook pdf) java programming language basicsRaffaella D'angelo
 

Tendances (18)

Java
JavaJava
Java
 
Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)
 
Making Applications Work Together In Eclipse
Making Applications Work Together In EclipseMaking Applications Work Together In Eclipse
Making Applications Work Together In Eclipse
 
Java Lecture 1
Java Lecture 1Java Lecture 1
Java Lecture 1
 
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
 
perl-java
perl-javaperl-java
perl-java
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Java ms harsha
Java ms harshaJava ms harsha
Java ms harsha
 
Gwt and JSR 269's Pluggable Annotation Processing API
Gwt and JSR 269's Pluggable Annotation Processing APIGwt and JSR 269's Pluggable Annotation Processing API
Gwt and JSR 269's Pluggable Annotation Processing API
 
java tutorial for beginner - Free Download
java tutorial for beginner - Free Downloadjava tutorial for beginner - Free Download
java tutorial for beginner - Free Download
 
Java seminar
Java seminarJava seminar
Java seminar
 
Features of java unit 1
Features of java unit 1Features of java unit 1
Features of java unit 1
 
Java intro
Java introJava intro
Java intro
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruiters
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
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
 
Learn java in hindi
Learn java in hindiLearn java in hindi
Learn java in hindi
 
(Ebook pdf) java programming language basics
(Ebook pdf)   java programming language basics(Ebook pdf)   java programming language basics
(Ebook pdf) java programming language basics
 

Similaire à Java course-in-mumbai

Core java-introduction
Core java-introductionCore java-introduction
Core java-introductionRamlal Pawar
 
01slide (1)ffgfefge
01slide (1)ffgfefge01slide (1)ffgfefge
01slide (1)ffgfefgebsnl007
 
Unit of competency
Unit of competencyUnit of competency
Unit of competencyloidasacueza
 
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
 
Bca 4020 java programming
Bca 4020   java programmingBca 4020   java programming
Bca 4020 java programmingsmumbahelp
 
Elements of Java Language
Elements of Java Language Elements of Java Language
Elements of Java Language Hitesh-Java
 
OOP with Java
OOP with JavaOOP with Java
OOP with JavaOmegaHub
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docxvikasbagra9887
 
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
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdfAdiseshaK
 
Session 02 - Elements of Java Language
Session 02 - Elements of Java LanguageSession 02 - Elements of Java Language
Session 02 - Elements of Java LanguagePawanMM
 

Similaire à Java course-in-mumbai (20)

Professional-core-java-training
Professional-core-java-trainingProfessional-core-java-training
Professional-core-java-training
 
Java intro
Java introJava intro
Java intro
 
Core java-introduction
Core java-introductionCore java-introduction
Core java-introduction
 
01slide
01slide01slide
01slide
 
01slide (1)ffgfefge
01slide (1)ffgfefge01slide (1)ffgfefge
01slide (1)ffgfefge
 
01slide
01slide01slide
01slide
 
01slide
01slide01slide
01slide
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
 
Unit of competency
Unit of competencyUnit of competency
Unit of competency
 
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
 
Bca 4020 java programming
Bca 4020   java programmingBca 4020   java programming
Bca 4020 java programming
 
Basics of java 1
Basics of java 1Basics of java 1
Basics of java 1
 
Elements of Java Language
Elements of Java Language Elements of Java Language
Elements of Java Language
 
OOP with Java
OOP with JavaOOP with Java
OOP with Java
 
J introtojava1-pdf
J introtojava1-pdfJ introtojava1-pdf
J introtojava1-pdf
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docx
 
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 Programming
Java ProgrammingJava Programming
Java Programming
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdf
 
Session 02 - Elements of Java Language
Session 02 - Elements of Java LanguageSession 02 - Elements of Java Language
Session 02 - Elements of Java Language
 

Plus de Unmesh Baile

java-corporate-training-institute-in-mumbai
java-corporate-training-institute-in-mumbaijava-corporate-training-institute-in-mumbai
java-corporate-training-institute-in-mumbaiUnmesh Baile
 
Php mysql training-in-mumbai
Php mysql training-in-mumbaiPhp mysql training-in-mumbai
Php mysql training-in-mumbaiUnmesh Baile
 
Robotics corporate-training-in-mumbai
Robotics corporate-training-in-mumbaiRobotics corporate-training-in-mumbai
Robotics corporate-training-in-mumbaiUnmesh Baile
 
Corporate-training-for-msbi-course-in-mumbai
Corporate-training-for-msbi-course-in-mumbaiCorporate-training-for-msbi-course-in-mumbai
Corporate-training-for-msbi-course-in-mumbaiUnmesh Baile
 
Linux corporate-training-in-mumbai
Linux corporate-training-in-mumbaiLinux corporate-training-in-mumbai
Linux corporate-training-in-mumbaiUnmesh Baile
 
Professional dataware-housing-training-in-mumbai
Professional dataware-housing-training-in-mumbaiProfessional dataware-housing-training-in-mumbai
Professional dataware-housing-training-in-mumbaiUnmesh Baile
 
Best-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiBest-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiUnmesh Baile
 
Selenium-corporate-training-in-mumbai
Selenium-corporate-training-in-mumbaiSelenium-corporate-training-in-mumbai
Selenium-corporate-training-in-mumbaiUnmesh Baile
 
Weblogic-clustering-failover-and-load-balancing-training
Weblogic-clustering-failover-and-load-balancing-trainingWeblogic-clustering-failover-and-load-balancing-training
Weblogic-clustering-failover-and-load-balancing-trainingUnmesh Baile
 
Advance-excel-professional-trainer-in-mumbai
Advance-excel-professional-trainer-in-mumbaiAdvance-excel-professional-trainer-in-mumbai
Advance-excel-professional-trainer-in-mumbaiUnmesh Baile
 
Best corporate-r-programming-training-in-mumbai
Best corporate-r-programming-training-in-mumbaiBest corporate-r-programming-training-in-mumbai
Best corporate-r-programming-training-in-mumbaiUnmesh Baile
 
R-programming-training-in-mumbai
R-programming-training-in-mumbaiR-programming-training-in-mumbai
R-programming-training-in-mumbaiUnmesh Baile
 
Corporate-data-warehousing-training
Corporate-data-warehousing-trainingCorporate-data-warehousing-training
Corporate-data-warehousing-trainingUnmesh Baile
 
Sas-training-in-mumbai
Sas-training-in-mumbaiSas-training-in-mumbai
Sas-training-in-mumbaiUnmesh Baile
 
Microsoft-business-intelligence-training-in-mumbai
Microsoft-business-intelligence-training-in-mumbaiMicrosoft-business-intelligence-training-in-mumbai
Microsoft-business-intelligence-training-in-mumbaiUnmesh Baile
 
Linux-training-for-beginners-in-mumbai
Linux-training-for-beginners-in-mumbaiLinux-training-for-beginners-in-mumbai
Linux-training-for-beginners-in-mumbaiUnmesh Baile
 
Corporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbaiCorporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbaiUnmesh Baile
 
Corporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbaiCorporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbaiUnmesh Baile
 
Best-robotics-training-in-mumbai
Best-robotics-training-in-mumbaiBest-robotics-training-in-mumbai
Best-robotics-training-in-mumbaiUnmesh Baile
 
Best-embedded-system-classes-in-mumbai
Best-embedded-system-classes-in-mumbaiBest-embedded-system-classes-in-mumbai
Best-embedded-system-classes-in-mumbaiUnmesh Baile
 

Plus de Unmesh Baile (20)

java-corporate-training-institute-in-mumbai
java-corporate-training-institute-in-mumbaijava-corporate-training-institute-in-mumbai
java-corporate-training-institute-in-mumbai
 
Php mysql training-in-mumbai
Php mysql training-in-mumbaiPhp mysql training-in-mumbai
Php mysql training-in-mumbai
 
Robotics corporate-training-in-mumbai
Robotics corporate-training-in-mumbaiRobotics corporate-training-in-mumbai
Robotics corporate-training-in-mumbai
 
Corporate-training-for-msbi-course-in-mumbai
Corporate-training-for-msbi-course-in-mumbaiCorporate-training-for-msbi-course-in-mumbai
Corporate-training-for-msbi-course-in-mumbai
 
Linux corporate-training-in-mumbai
Linux corporate-training-in-mumbaiLinux corporate-training-in-mumbai
Linux corporate-training-in-mumbai
 
Professional dataware-housing-training-in-mumbai
Professional dataware-housing-training-in-mumbaiProfessional dataware-housing-training-in-mumbai
Professional dataware-housing-training-in-mumbai
 
Best-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiBest-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbai
 
Selenium-corporate-training-in-mumbai
Selenium-corporate-training-in-mumbaiSelenium-corporate-training-in-mumbai
Selenium-corporate-training-in-mumbai
 
Weblogic-clustering-failover-and-load-balancing-training
Weblogic-clustering-failover-and-load-balancing-trainingWeblogic-clustering-failover-and-load-balancing-training
Weblogic-clustering-failover-and-load-balancing-training
 
Advance-excel-professional-trainer-in-mumbai
Advance-excel-professional-trainer-in-mumbaiAdvance-excel-professional-trainer-in-mumbai
Advance-excel-professional-trainer-in-mumbai
 
Best corporate-r-programming-training-in-mumbai
Best corporate-r-programming-training-in-mumbaiBest corporate-r-programming-training-in-mumbai
Best corporate-r-programming-training-in-mumbai
 
R-programming-training-in-mumbai
R-programming-training-in-mumbaiR-programming-training-in-mumbai
R-programming-training-in-mumbai
 
Corporate-data-warehousing-training
Corporate-data-warehousing-trainingCorporate-data-warehousing-training
Corporate-data-warehousing-training
 
Sas-training-in-mumbai
Sas-training-in-mumbaiSas-training-in-mumbai
Sas-training-in-mumbai
 
Microsoft-business-intelligence-training-in-mumbai
Microsoft-business-intelligence-training-in-mumbaiMicrosoft-business-intelligence-training-in-mumbai
Microsoft-business-intelligence-training-in-mumbai
 
Linux-training-for-beginners-in-mumbai
Linux-training-for-beginners-in-mumbaiLinux-training-for-beginners-in-mumbai
Linux-training-for-beginners-in-mumbai
 
Corporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbaiCorporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbai
 
Corporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbaiCorporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbai
 
Best-robotics-training-in-mumbai
Best-robotics-training-in-mumbaiBest-robotics-training-in-mumbai
Best-robotics-training-in-mumbai
 
Best-embedded-system-classes-in-mumbai
Best-embedded-system-classes-in-mumbaiBest-embedded-system-classes-in-mumbai
Best-embedded-system-classes-in-mumbai
 

Dernier

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Dernier (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Java course-in-mumbai

  • 2. INTRODUCTION TO JAVA PROGRAMMINGVIBRANT TECHNOLOGY & COMPUTERS VASHI,NAVI MUMBAI
  • 5. CONTENT: 1.HISTROY OF JAVA 2.CHARACTERISTICS OF JAVA 3.JDK VERSIONS 17.EXIT METHOD4.JDK EDITIONS 5.JAVA IDE TOOLS 6.GETTING START WITH JAVA 7.SIMPLE APPLICATIONS 8.CREATING AND COMPLILING PROGRAMS 9.ANATOMY OF JAVA PROGRAMS 10.COMMENTS 11.PACKAGES 12.STATEMENTS 13.BLOCKS 14.CLASSES 15.METHODS 16.MAIN METHODS WWW.VIBRANTTECHNOLOGIES.CO.IN 5
  • 6. 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 6
  • 7. 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 7
  • 8. 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 8
  • 9. INTRODUCTION TO JAVA What Is Java? Getting Started With Java Programming  Create, Compile and Running a Java Application WWW.VIBRANTTECHNOLOGIES.CO.IN 9
  • 10. WHAT IS JAVA? History Characteristics of Java WWW.VIBRANTTECHNOLOGIES.CO.IN 10
  • 11. 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 11
  • 12. 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 12
  • 13. 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 13
  • 14. 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 14
  • 15. JAVA IDE TOOLS Forte by Sun MicroSystems Borland JBuilder Microsoft Visual J++ WebGain Café IBM Visual Age for Java WWW.VIBRANTTECHNOLOGIES.CO.IN 15
  • 16. GETTING STARTED WITH JAVA PROGRAMMING A Simple Java Application Compiling Programs Executing Applications WWW.VIBRANTTECHNOLOGIES.CO.IN 16
  • 17. 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!"); } } WWW.VIBRANTTECHNOLOGIES.CO.IN 17 RunRunSourceSource NOTE: To run the program, install slide files on hard disk.
  • 18. CREATING AND COMPILING PROGRAMS On command line javac file.java WWW.VIBRANTTECHNOLOGIES.CO.IN 18 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
  • 19. EXECUTING APPLICATIONS On command line java classname WWW.VIBRANTTECHNOLOGIES.CO.IN 19 Java Interpreter on Windows Java Interpreter on Sun Solaris Java Interpreter on Linux Bytecode ...
  • 21. COMPILING AND RUNNING A PROGRAM WWW.VIBRANTTECHNOLOGIES.CO.IN 21 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~
  • 22. ANATOMY OF A JAVA PROGRAM Comments Package Reserved words Modifiers Statements Blocks Classes Methods The main method WWW.VIBRANTTECHNOLOGIES.CO.IN 22
  • 23. 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 /*, it scans for the next */ andWWW.VIBRANTTECHNOLOGIES.CO.IN 23
  • 24. 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 24
  • 25. 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 are public, static, and void. Their use will be introduced WWW.VIBRANTTECHNOLOGIES.CO.IN 25
  • 26. 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 26
  • 27. 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 with a semicolon (;). WWW.VIBRANTTECHNOLOGIES.CO.IN 27
  • 28. BLOCKS WWW.VIBRANTTECHNOLOGIES.CO.IN 28 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
  • 29. 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 a program is defined by using one WWW.VIBRANTTECHNOLOGIES.CO.IN 29
  • 30. 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 a different argument to print a different message. WWW.VIBRANTTECHNOLOGIES.CO.IN 30
  • 31. 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; WWW.VIBRANTTECHNOLOGIES.CO.IN 31
  • 32. 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.” WWW.VIBRANTTECHNOLOGIES.CO.IN 32 RunRunSourceSource
  • 33. THE SHOWMESSAGEDIALOG METHOD JOptionPane.showMessageDialog(null, "Welcome to Java!", "Example 1.2", JOptionPane.INFORMATION_MESSAGE)); WWW.VIBRANTTECHNOLOGIES.CO.IN 33
  • 34. 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 theWWW.VIBRANTTECHNOLOGIES.CO.IN 34

Notes de l'éditeur

  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.