SlideShare a Scribd company logo
1 of 34
Download to read offline
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 StartedWith Java Programming
 Create, Compile and Running a JavaApplication
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, SunWorld
 HotJava
 The first Java-enabledWeb 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
 MicrosoftVisual J++
 WebGain Café
 IBMVisual Age for Java
Getting Started with Java
Programming
www.vibranttechnologies.co.in15
 A Simple JavaApplication
 Compiling Programs
 ExecutingApplications
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!");
}
}
RunSource
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 /*, it scans for the next */
and ignores any text between /* and */.
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 later in the
book.
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 a semicolon (;).
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 program is
defined by using one or more classes.
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) {
// Statements;
}
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.”
RunSource
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

What's hot

Grade 8: Introduction To Java
Grade 8: Introduction To JavaGrade 8: Introduction To Java
Grade 8: Introduction To Javanandanrocker
 
Java course-in-mumbai
Java course-in-mumbaiJava course-in-mumbai
Java course-in-mumbaivibrantuser
 
Java session01
Java session01Java session01
Java session01Niit Care
 
Top 10 Interview Questions For Java
Top 10 Interview Questions For JavaTop 10 Interview Questions For Java
Top 10 Interview Questions For JavaEME Technologies
 
Java Lecture 1
Java Lecture 1Java Lecture 1
Java Lecture 1Qualys
 
Java programming language
Java programming languageJava programming language
Java programming languageSubhashKumar329
 
8 most expected java interview questions
8 most expected java interview questions8 most expected java interview questions
8 most expected java interview questionsPoonam Kherde
 
Java design pattern tutorial
Java design pattern tutorialJava design pattern tutorial
Java design pattern tutorialAshoka Vanjare
 
Basic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a jobBasic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a jobGaruda Trainings
 
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
 
Dev labs alliance top 20 basic java interview question for sdet
Dev labs alliance top 20 basic java interview question for sdetDev labs alliance top 20 basic java interview question for sdet
Dev labs alliance top 20 basic java interview question for sdetdevlabsalliance
 
Applying Anti-Reversing Techniques to Java Bytecode
Applying Anti-Reversing Techniques to Java BytecodeApplying Anti-Reversing Techniques to Java Bytecode
Applying Anti-Reversing Techniques to Java BytecodeTeodoro Cipresso
 
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007Arun Kumar
 
20 most important java programming interview questions
20 most important java programming interview questions20 most important java programming interview questions
20 most important java programming interview questionsGradeup
 
Parallelogram by using j2 me j2me.shahid
Parallelogram by using j2 me j2me.shahidParallelogram by using j2 me j2me.shahid
Parallelogram by using j2 me j2me.shahidShahid Riaz
 
Vb.net basics 1(vb,net--3 year)
Vb.net basics 1(vb,net--3 year)Vb.net basics 1(vb,net--3 year)
Vb.net basics 1(vb,net--3 year)Ankit Gupta
 
Reversing and Patching Java Bytecode
Reversing and Patching Java BytecodeReversing and Patching Java Bytecode
Reversing and Patching Java BytecodeTeodoro Cipresso
 

What's hot (20)

Grade 8: Introduction To Java
Grade 8: Introduction To JavaGrade 8: Introduction To Java
Grade 8: Introduction To Java
 
Java course-in-mumbai
Java course-in-mumbaiJava course-in-mumbai
Java course-in-mumbai
 
Java session01
Java session01Java session01
Java session01
 
Top 10 Interview Questions For Java
Top 10 Interview Questions For JavaTop 10 Interview Questions For Java
Top 10 Interview Questions For Java
 
String class
String classString class
String class
 
Java Lecture 1
Java Lecture 1Java Lecture 1
Java Lecture 1
 
Java programming language
Java programming languageJava programming language
Java programming language
 
8 most expected java interview questions
8 most expected java interview questions8 most expected java interview questions
8 most expected java interview questions
 
Java design pattern tutorial
Java design pattern tutorialJava design pattern tutorial
Java design pattern tutorial
 
Basic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a jobBasic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a job
 
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
 
Dev labs alliance top 20 basic java interview question for sdet
Dev labs alliance top 20 basic java interview question for sdetDev labs alliance top 20 basic java interview question for sdet
Dev labs alliance top 20 basic java interview question for sdet
 
Applying Anti-Reversing Techniques to Java Bytecode
Applying Anti-Reversing Techniques to Java BytecodeApplying Anti-Reversing Techniques to Java Bytecode
Applying Anti-Reversing Techniques to Java Bytecode
 
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
 
20 most important java programming interview questions
20 most important java programming interview questions20 most important java programming interview questions
20 most important java programming interview questions
 
Parallelogram by using j2 me j2me.shahid
Parallelogram by using j2 me j2me.shahidParallelogram by using j2 me j2me.shahid
Parallelogram by using j2 me j2me.shahid
 
What is Java? Presentation On Introduction To Core Java By PSK Technologies
What is Java? Presentation On Introduction To Core Java By PSK TechnologiesWhat is Java? Presentation On Introduction To Core Java By PSK Technologies
What is Java? Presentation On Introduction To Core Java By PSK Technologies
 
Vb.net basics 1(vb,net--3 year)
Vb.net basics 1(vb,net--3 year)Vb.net basics 1(vb,net--3 year)
Vb.net basics 1(vb,net--3 year)
 
Reversing and Patching Java Bytecode
Reversing and Patching Java BytecodeReversing and Patching Java Bytecode
Reversing and Patching Java Bytecode
 
Java notes
Java notesJava notes
Java notes
 

Viewers also liked

Core Java introduction | Basics | free course
Core Java introduction | Basics | free course Core Java introduction | Basics | free course
Core Java introduction | Basics | free course Kernel Training
 
basic core java up to operator
basic core java up to operatorbasic core java up to operator
basic core java up to operatorkamal kotecha
 
Java Presentation
Java PresentationJava Presentation
Java Presentationpm2214
 
Java Presentation
Java PresentationJava Presentation
Java Presentationaitrichtech
 
Summer Training In Java
Summer Training In JavaSummer Training In Java
Summer Training In JavaDUCC Systems
 
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
 
Summer training guidelines ppt
Summer training guidelines pptSummer training guidelines ppt
Summer training guidelines pptGurjar Patel
 
Core java report
Core java reportCore java report
Core java reportSumit Jain
 
Summer Training Presentation .
Summer Training Presentation .Summer Training Presentation .
Summer Training Presentation .PUSHP
 
Core java concepts
Core java  conceptsCore java  concepts
Core java conceptsRam132
 

Viewers also liked (13)

Core Java introduction | Basics | free course
Core Java introduction | Basics | free course Core Java introduction | Basics | free course
Core Java introduction | Basics | free course
 
Sachin
SachinSachin
Sachin
 
Core java
Core javaCore java
Core java
 
basic core java up to operator
basic core java up to operatorbasic core java up to operator
basic core java up to operator
 
Java Presentation
Java PresentationJava Presentation
Java Presentation
 
Java Presentation
Java PresentationJava Presentation
Java Presentation
 
Summer Training In Java
Summer Training In JavaSummer Training In Java
Summer Training In 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
 
Summer training guidelines ppt
Summer training guidelines pptSummer training guidelines ppt
Summer training guidelines ppt
 
Core java report
Core java reportCore java report
Core java report
 
Summer Training Presentation .
Summer Training Presentation .Summer Training Presentation .
Summer Training Presentation .
 
Core java concepts
Core java  conceptsCore java  concepts
Core java concepts
 
Java tutorial PPT
Java tutorial PPTJava tutorial PPT
Java tutorial PPT
 

Similar to Professional-core-java-training

Java course-in-mumbai
Java course-in-mumbaiJava course-in-mumbai
Java course-in-mumbaiUnmesh Baile
 
Core java-introduction
Core java-introductionCore java-introduction
Core java-introductionRamlal Pawar
 
01slide (1)ffgfefge
01slide (1)ffgfefge01slide (1)ffgfefge
01slide (1)ffgfefgebsnl007
 
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
 
Top 10 Important Core Java Interview questions and answers.pdf
Top 10 Important Core Java Interview questions and answers.pdfTop 10 Important Core Java Interview questions and answers.pdf
Top 10 Important Core Java Interview questions and answers.pdfUmesh Kumar
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to JavaDevaKumari Vijay
 
OOP with Java
OOP with JavaOOP with Java
OOP with JavaOmegaHub
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdfAdiseshaK
 
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
 

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

Java course-in-mumbai
Java course-in-mumbaiJava course-in-mumbai
Java course-in-mumbai
 
Java intro
Java introJava intro
Java intro
 
01slide
01slide01slide
01slide
 
Core java-introduction
Core java-introductionCore java-introduction
Core java-introduction
 
01slide
01slide01slide
01slide
 
01slide
01slide01slide
01slide
 
01slide (1)ffgfefge
01slide (1)ffgfefge01slide (1)ffgfefge
01slide (1)ffgfefge
 
Java Standard edition(Java ) programming Basics for beginner's
Java Standard edition(Java ) programming Basics  for beginner'sJava Standard edition(Java ) programming Basics  for beginner's
Java Standard edition(Java ) programming Basics for beginner's
 
Java chapter 1
Java   chapter 1Java   chapter 1
Java chapter 1
 
Top 10 Important Core Java Interview questions and answers.pdf
Top 10 Important Core Java Interview questions and answers.pdfTop 10 Important Core Java Interview questions and answers.pdf
Top 10 Important Core Java Interview questions and answers.pdf
 
Java ms harsha
Java ms harshaJava ms harsha
Java ms harsha
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to Java
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
 
Basics of java 1
Basics of java 1Basics of java 1
Basics of java 1
 
OOP with Java
OOP with JavaOOP with Java
OOP with Java
 
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
 
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
 

More from Vibrant Technologies & Computers

Data ware housing - Introduction to data ware housing process.
Data ware housing - Introduction to data ware housing process.Data ware housing - Introduction to data ware housing process.
Data ware housing - Introduction to data ware housing process.Vibrant Technologies & Computers
 

More from Vibrant Technologies & Computers (20)

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

Recently uploaded

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
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 pragmaticscarlostorres15106
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Recently uploaded (20)

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 

Professional-core-java-training

  • 2. VibrantTechnology & Computers Vashi,Navi Mumbai Introduction to Java Programming
  • 5. 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.
  • 6. 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)
  • 7. 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
  • 8. Introduction to Java www.vibranttechnologies.co.in8  What Is Java?  Getting StartedWith Java Programming  Create, Compile and Running a JavaApplication
  • 9. What Is Java? www.vibranttechnologies.co.in9  History  Characteristics of Java
  • 10. History www.vibranttechnologies.co.in10  James Gosling and Sun Microsystems  Oak  Java, May 20, 1995, SunWorld  HotJava  The first Java-enabledWeb browser  JDK Evolutions  J2SE, J2ME, and J2EE (not mentioned in the book, but could discuss here optionally)
  • 11. 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
  • 12. 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)
  • 13. 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.
  • 14. Java IDE Tools www.vibranttechnologies.co.in14  Forte by Sun MicroSystems  Borland JBuilder  MicrosoftVisual J++  WebGain Café  IBMVisual Age for Java
  • 15. Getting Started with Java Programming www.vibranttechnologies.co.in15  A Simple JavaApplication  Compiling Programs  ExecutingApplications
  • 16. 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!"); } } RunSource NOTE: To run the program, install slide files on hard disk.
  • 17. 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
  • 18. 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 ...
  • 20. 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~
  • 21. Anatomy of a Java Program www.vibranttechnologies.co.in21  Comments  Package  Reserved words  Modifiers  Statements  Blocks  Classes  Methods  The main method
  • 22. 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 /*, it scans for the next */ and ignores any text between /* and */.
  • 23. 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.
  • 24. 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 later in the book.
  • 25. 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."
  • 26. 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 a semicolon (;).
  • 27. 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
  • 28. 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 program is defined by using one or more classes.
  • 29. 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.
  • 30. 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) { // Statements; }
  • 31. 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.” RunSource
  • 32. The showMessageDialog Method www.vibranttechnologies.co.in32 JOptionPane.showMessageDialog(null, "Welcome to Java!", "Example 1.2", JOptionPane.INFORMATION_MESSAGE));
  • 33. 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.