SlideShare une entreprise Scribd logo
1  sur  38
WORA- Write Once Run Everywhere
Documentation Section
• Includes the comments to improve the readability of the program

Package Statement
• Include package declarations

Import Statements
• Include statements used to referring classes and interfaces that are declared in other packages

Interface Section
• Similar to class; but only include constants and method declarations

Class Section
• Information about user defined classes present in the program
Start Notepad and type following program-

Save this file as Hello.java
The class name – always starts with capital letter
File name should be exactly same of the class name in which main()
function is exist
Always remember to capitalize the first letter of System and String
keywords
1.
2.
3.
4.
5.

Go to the command prompt
go to the directory where your program is saved
type javac File_Name.java
If error is there in program, compiler will show error list with line numbers
If no error, it just show the prompt.

No Error
To run Java Program typejava File_Name
The output will be appear on the screen
Keywords

Special
symbols

Identifiers

Token

Operators

Literals
???
For example:
byte a = 68;
char a = 'A'
No commas or blank spaces are allowed
Valid Integer Literals
20

0x56

9978

09

Invalid Integer Literals
5,45

0x 67

89 90

It can be either +ve or –ve. If no sign is there, it will consider +ve by default
Valid Integer Literals
20

-56

-978

0999

Invalid Integer Literals
5-45

It must not have a decimal integer
Valid Integer Literals
20 -56

-978

0999

Invalid Integer Literals
5.45 0x8.98 087.56
Integer Part

.

Fractional Part

Floating Point Number

Example
12.90 345.89 67.87
• Mantissa is a floating point number in standard notation
• Exponent denotes power of 10
• Mantissa and exponent parts are separated by letter E or e
Visit unicode.org for detailed table
Java language supports few special escape sequences for String and char literals
as well. They are:
Notation

Character represented

Abbr

Action Performed

n

Newline/ Line Feed (0x0a) Ascii - 10

NL/ LF

insert New Line

r

Carriage return (0x0d) Ascii - 13

CR

return to the beginning of the current line

f

Formfeed (0x0c) Ascii 12

FF

advance downward to the next "page"

b

Backspace (0x08)

s

Space (0x20)

t

tab

"

Double quote

'

Single quote



backslash

ddd
uxxxx

Octal character (ddd)
Hexadecimal UNICODE character

Contenu connexe

Tendances

OCA Java SE 8 Exam Chapter 1 Java Building Blocks
OCA Java SE 8 Exam Chapter 1 Java Building BlocksOCA Java SE 8 Exam Chapter 1 Java Building Blocks
OCA Java SE 8 Exam Chapter 1 Java Building Blocksİbrahim Kürce
 
Framework Design Guidelines
Framework Design GuidelinesFramework Design Guidelines
Framework Design GuidelinesMohamed Meligy
 
Grade 11 CS Review (unit 1)
Grade 11 CS Review (unit 1)Grade 11 CS Review (unit 1)
Grade 11 CS Review (unit 1)kcardinale113
 
9781111530532 ppt ch04
9781111530532 ppt ch049781111530532 ppt ch04
9781111530532 ppt ch04Terry Yoast
 
Error Recovery strategies and yacc | Compiler Design
Error Recovery strategies and yacc | Compiler DesignError Recovery strategies and yacc | Compiler Design
Error Recovery strategies and yacc | Compiler DesignShamsul Huda
 
Java se 8 fundamentals
Java se 8 fundamentalsJava se 8 fundamentals
Java se 8 fundamentalsmegharajk
 
Compiling and understanding first program in java
Compiling and understanding first program in javaCompiling and understanding first program in java
Compiling and understanding first program in javaJamsher bhanbhro
 
The Go Programing Language 1
The Go Programing Language 1The Go Programing Language 1
The Go Programing Language 1İbrahim Kürce
 
Solutions manual for absolute java 5th edition by walter savitch
Solutions manual for absolute java 5th edition by walter savitchSolutions manual for absolute java 5th edition by walter savitch
Solutions manual for absolute java 5th edition by walter savitchAlbern9271
 
OCA Java SE 8 Exam Chapter 2 Operators & Statements
OCA Java SE 8 Exam Chapter 2 Operators & StatementsOCA Java SE 8 Exam Chapter 2 Operators & Statements
OCA Java SE 8 Exam Chapter 2 Operators & Statementsİbrahim Kürce
 
Chap1introppt1php basic
Chap1introppt1php basicChap1introppt1php basic
Chap1introppt1php basicmonikadeshmane
 
L3 operators
L3 operatorsL3 operators
L3 operatorsteach4uin
 
1 the language essentials
1 the language essentials1 the language essentials
1 the language essentialsHonnix Liang
 

Tendances (18)

OCA Java SE 8 Exam Chapter 1 Java Building Blocks
OCA Java SE 8 Exam Chapter 1 Java Building BlocksOCA Java SE 8 Exam Chapter 1 Java Building Blocks
OCA Java SE 8 Exam Chapter 1 Java Building Blocks
 
Framework Design Guidelines
Framework Design GuidelinesFramework Design Guidelines
Framework Design Guidelines
 
Grade 11 CS Review (unit 1)
Grade 11 CS Review (unit 1)Grade 11 CS Review (unit 1)
Grade 11 CS Review (unit 1)
 
9781111530532 ppt ch04
9781111530532 ppt ch049781111530532 ppt ch04
9781111530532 ppt ch04
 
Basic of java 2
Basic of java  2Basic of java  2
Basic of java 2
 
Review Python
Review PythonReview Python
Review Python
 
Error Recovery strategies and yacc | Compiler Design
Error Recovery strategies and yacc | Compiler DesignError Recovery strategies and yacc | Compiler Design
Error Recovery strategies and yacc | Compiler Design
 
Operators in java
Operators in javaOperators in java
Operators in java
 
Java se 8 fundamentals
Java se 8 fundamentalsJava se 8 fundamentals
Java se 8 fundamentals
 
Compiling and understanding first program in java
Compiling and understanding first program in javaCompiling and understanding first program in java
Compiling and understanding first program in java
 
Final keyword
Final keywordFinal keyword
Final keyword
 
The Go Programing Language 1
The Go Programing Language 1The Go Programing Language 1
The Go Programing Language 1
 
Solutions manual for absolute java 5th edition by walter savitch
Solutions manual for absolute java 5th edition by walter savitchSolutions manual for absolute java 5th edition by walter savitch
Solutions manual for absolute java 5th edition by walter savitch
 
OCA Java SE 8 Exam Chapter 2 Operators & Statements
OCA Java SE 8 Exam Chapter 2 Operators & StatementsOCA Java SE 8 Exam Chapter 2 Operators & Statements
OCA Java SE 8 Exam Chapter 2 Operators & Statements
 
Chap1introppt1php basic
Chap1introppt1php basicChap1introppt1php basic
Chap1introppt1php basic
 
L3 operators
L3 operatorsL3 operators
L3 operators
 
1 the language essentials
1 the language essentials1 the language essentials
1 the language essentials
 
Components of a python program
Components of a python program Components of a python program
Components of a python program
 

En vedette

Java Programming for Designers
Java Programming for DesignersJava Programming for Designers
Java Programming for DesignersR. Sosa
 
Fifty New Features of Java EE 7 in Fifty Minutes
Fifty New Features of Java EE 7 in Fifty MinutesFifty New Features of Java EE 7 in Fifty Minutes
Fifty New Features of Java EE 7 in Fifty MinutesArun Gupta
 
java programming basics - part ii
 java programming basics - part ii java programming basics - part ii
java programming basics - part iijyoti_lakhani
 
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012Arun Gupta
 
CON 3431 - Introducing Java Programming to Kids
CON 3431 - Introducing Java Programming to KidsCON 3431 - Introducing Java Programming to Kids
CON 3431 - Introducing Java Programming to KidsArun Gupta
 
5050 dev nation
5050 dev nation5050 dev nation
5050 dev nationArun Gupta
 

En vedette (6)

Java Programming for Designers
Java Programming for DesignersJava Programming for Designers
Java Programming for Designers
 
Fifty New Features of Java EE 7 in Fifty Minutes
Fifty New Features of Java EE 7 in Fifty MinutesFifty New Features of Java EE 7 in Fifty Minutes
Fifty New Features of Java EE 7 in Fifty Minutes
 
java programming basics - part ii
 java programming basics - part ii java programming basics - part ii
java programming basics - part ii
 
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
 
CON 3431 - Introducing Java Programming to Kids
CON 3431 - Introducing Java Programming to KidsCON 3431 - Introducing Java Programming to Kids
CON 3431 - Introducing Java Programming to Kids
 
5050 dev nation
5050 dev nation5050 dev nation
5050 dev nation
 

Similaire à java programming basics - part i

C Language (All Concept)
C Language (All Concept)C Language (All Concept)
C Language (All Concept)sachindane
 
8 statement-level control structure
8 statement-level control structure8 statement-level control structure
8 statement-level control structurejigeno
 
424769021-1-First-C-Program-1-ppt (1).ppt
424769021-1-First-C-Program-1-ppt (1).ppt424769021-1-First-C-Program-1-ppt (1).ppt
424769021-1-First-C-Program-1-ppt (1).pptadvRajatSharma
 
Getting started with c++
Getting started with c++Getting started with c++
Getting started with c++K Durga Prasad
 
Std 12 Computer Chapter 7 Java Basics (Part 1)
Std 12 Computer Chapter 7 Java Basics (Part 1)Std 12 Computer Chapter 7 Java Basics (Part 1)
Std 12 Computer Chapter 7 Java Basics (Part 1)Nuzhat Memon
 
presentation of java fundamental
presentation of java fundamentalpresentation of java fundamental
presentation of java fundamentalGanesh Chittalwar
 
Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.) I...
Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.) I...Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.) I...
Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.) I...GANESHBABUVelu
 

Similaire à java programming basics - part i (20)

Intro to Scala
 Intro to Scala Intro to Scala
Intro to Scala
 
java intro.pptx.pdf
java intro.pptx.pdfjava intro.pptx.pdf
java intro.pptx.pdf
 
Introduction to-programming
Introduction to-programmingIntroduction to-programming
Introduction to-programming
 
Annotations
AnnotationsAnnotations
Annotations
 
module 4.pptx
module 4.pptxmodule 4.pptx
module 4.pptx
 
C Language (All Concept)
C Language (All Concept)C Language (All Concept)
C Language (All Concept)
 
8 statement-level control structure
8 statement-level control structure8 statement-level control structure
8 statement-level control structure
 
java notes.pdf
java notes.pdfjava notes.pdf
java notes.pdf
 
424769021-1-First-C-Program-1-ppt (1).ppt
424769021-1-First-C-Program-1-ppt (1).ppt424769021-1-First-C-Program-1-ppt (1).ppt
424769021-1-First-C-Program-1-ppt (1).ppt
 
Getting started with c++
Getting started with c++Getting started with c++
Getting started with c++
 
Getting started with c++
Getting started with c++Getting started with c++
Getting started with c++
 
Std 12 Computer Chapter 7 Java Basics (Part 1)
Std 12 Computer Chapter 7 Java Basics (Part 1)Std 12 Computer Chapter 7 Java Basics (Part 1)
Std 12 Computer Chapter 7 Java Basics (Part 1)
 
Ch02
Ch02Ch02
Ch02
 
Introduction to C#
Introduction to C#Introduction to C#
Introduction to C#
 
presentation of java fundamental
presentation of java fundamentalpresentation of java fundamental
presentation of java fundamental
 
Chap 1 and 2
Chap 1 and 2Chap 1 and 2
Chap 1 and 2
 
PCSTt11 overview of java
PCSTt11 overview of javaPCSTt11 overview of java
PCSTt11 overview of java
 
Lecture02 java
Lecture02 javaLecture02 java
Lecture02 java
 
Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.) I...
Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.) I...Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.) I...
Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.) I...
 
Java fundamentals
Java fundamentalsJava fundamentals
Java fundamentals
 

Plus de jyoti_lakhani

CG02 Computer Graphic Systems.ppsx
CG02 Computer Graphic Systems.ppsxCG02 Computer Graphic Systems.ppsx
CG02 Computer Graphic Systems.ppsxjyoti_lakhani
 
CG04 Color Models.ppsx
CG04 Color Models.ppsxCG04 Color Models.ppsx
CG04 Color Models.ppsxjyoti_lakhani
 
CG03 Random Raster Scan displays and Color CRTs.ppsx
CG03 Random Raster Scan displays and Color CRTs.ppsxCG03 Random Raster Scan displays and Color CRTs.ppsx
CG03 Random Raster Scan displays and Color CRTs.ppsxjyoti_lakhani
 
CG02 Computer Graphic Systems.pptx
CG02 Computer Graphic Systems.pptxCG02 Computer Graphic Systems.pptx
CG02 Computer Graphic Systems.pptxjyoti_lakhani
 
CG01 introduction.ppsx
CG01 introduction.ppsxCG01 introduction.ppsx
CG01 introduction.ppsxjyoti_lakhani
 
Tree terminology and introduction to binary tree
Tree terminology and introduction to binary treeTree terminology and introduction to binary tree
Tree terminology and introduction to binary treejyoti_lakhani
 
Ds006 linked list- delete from front
Ds006   linked list- delete from frontDs006   linked list- delete from front
Ds006 linked list- delete from frontjyoti_lakhani
 
Ds06 linked list- insert a node after a given node
Ds06   linked list-  insert a node after a given nodeDs06   linked list-  insert a node after a given node
Ds06 linked list- insert a node after a given nodejyoti_lakhani
 
Ds06 linked list- insert a node at end
Ds06   linked list- insert a node at endDs06   linked list- insert a node at end
Ds06 linked list- insert a node at endjyoti_lakhani
 
Ds06 linked list- insert a node at beginning
Ds06   linked list- insert a node at beginningDs06   linked list- insert a node at beginning
Ds06 linked list- insert a node at beginningjyoti_lakhani
 
Ds06 linked list- intro and create a node
Ds06   linked list- intro and create a nodeDs06   linked list- intro and create a node
Ds06 linked list- intro and create a nodejyoti_lakhani
 
Ds04 abstract data types (adt) jyoti lakhani
Ds04 abstract data types (adt) jyoti lakhaniDs04 abstract data types (adt) jyoti lakhani
Ds04 abstract data types (adt) jyoti lakhanijyoti_lakhani
 
Ds03 part i algorithms by jyoti lakhani
Ds03 part i algorithms   by jyoti lakhaniDs03 part i algorithms   by jyoti lakhani
Ds03 part i algorithms by jyoti lakhanijyoti_lakhani
 
Ds03 algorithms jyoti lakhani
Ds03 algorithms jyoti lakhaniDs03 algorithms jyoti lakhani
Ds03 algorithms jyoti lakhanijyoti_lakhani
 
Ds02 flow chart and pseudo code
Ds02 flow chart and pseudo codeDs02 flow chart and pseudo code
Ds02 flow chart and pseudo codejyoti_lakhani
 
Ds01 data structure introduction - by jyoti lakhani
Ds01 data structure  introduction - by jyoti lakhaniDs01 data structure  introduction - by jyoti lakhani
Ds01 data structure introduction - by jyoti lakhanijyoti_lakhani
 

Plus de jyoti_lakhani (20)

CG02 Computer Graphic Systems.ppsx
CG02 Computer Graphic Systems.ppsxCG02 Computer Graphic Systems.ppsx
CG02 Computer Graphic Systems.ppsx
 
Projections.pptx
Projections.pptxProjections.pptx
Projections.pptx
 
CG04 Color Models.ppsx
CG04 Color Models.ppsxCG04 Color Models.ppsx
CG04 Color Models.ppsx
 
CG03 Random Raster Scan displays and Color CRTs.ppsx
CG03 Random Raster Scan displays and Color CRTs.ppsxCG03 Random Raster Scan displays and Color CRTs.ppsx
CG03 Random Raster Scan displays and Color CRTs.ppsx
 
CG02 Computer Graphic Systems.pptx
CG02 Computer Graphic Systems.pptxCG02 Computer Graphic Systems.pptx
CG02 Computer Graphic Systems.pptx
 
CG01 introduction.ppsx
CG01 introduction.ppsxCG01 introduction.ppsx
CG01 introduction.ppsx
 
Doubly linked list
Doubly linked listDoubly linked list
Doubly linked list
 
Double ended queue
Double ended queueDouble ended queue
Double ended queue
 
Tree terminology and introduction to binary tree
Tree terminology and introduction to binary treeTree terminology and introduction to binary tree
Tree terminology and introduction to binary tree
 
Priority queue
Priority queuePriority queue
Priority queue
 
Ds006 linked list- delete from front
Ds006   linked list- delete from frontDs006   linked list- delete from front
Ds006 linked list- delete from front
 
Ds06 linked list- insert a node after a given node
Ds06   linked list-  insert a node after a given nodeDs06   linked list-  insert a node after a given node
Ds06 linked list- insert a node after a given node
 
Ds06 linked list- insert a node at end
Ds06   linked list- insert a node at endDs06   linked list- insert a node at end
Ds06 linked list- insert a node at end
 
Ds06 linked list- insert a node at beginning
Ds06   linked list- insert a node at beginningDs06   linked list- insert a node at beginning
Ds06 linked list- insert a node at beginning
 
Ds06 linked list- intro and create a node
Ds06   linked list- intro and create a nodeDs06   linked list- intro and create a node
Ds06 linked list- intro and create a node
 
Ds04 abstract data types (adt) jyoti lakhani
Ds04 abstract data types (adt) jyoti lakhaniDs04 abstract data types (adt) jyoti lakhani
Ds04 abstract data types (adt) jyoti lakhani
 
Ds03 part i algorithms by jyoti lakhani
Ds03 part i algorithms   by jyoti lakhaniDs03 part i algorithms   by jyoti lakhani
Ds03 part i algorithms by jyoti lakhani
 
Ds03 algorithms jyoti lakhani
Ds03 algorithms jyoti lakhaniDs03 algorithms jyoti lakhani
Ds03 algorithms jyoti lakhani
 
Ds02 flow chart and pseudo code
Ds02 flow chart and pseudo codeDs02 flow chart and pseudo code
Ds02 flow chart and pseudo code
 
Ds01 data structure introduction - by jyoti lakhani
Ds01 data structure  introduction - by jyoti lakhaniDs01 data structure  introduction - by jyoti lakhani
Ds01 data structure introduction - by jyoti lakhani
 

Dernier

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
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
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
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
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
"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
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
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
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Dernier (20)

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
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
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
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!
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
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
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
"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
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
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
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

java programming basics - part i

  • 1.
  • 2.
  • 3. WORA- Write Once Run Everywhere
  • 4.
  • 5.
  • 6. Documentation Section • Includes the comments to improve the readability of the program Package Statement • Include package declarations Import Statements • Include statements used to referring classes and interfaces that are declared in other packages Interface Section • Similar to class; but only include constants and method declarations Class Section • Information about user defined classes present in the program
  • 7. Start Notepad and type following program- Save this file as Hello.java
  • 8. The class name – always starts with capital letter
  • 9. File name should be exactly same of the class name in which main() function is exist
  • 10. Always remember to capitalize the first letter of System and String keywords
  • 11. 1. 2. 3. 4. 5. Go to the command prompt go to the directory where your program is saved type javac File_Name.java If error is there in program, compiler will show error list with line numbers If no error, it just show the prompt. No Error
  • 12. To run Java Program typejava File_Name The output will be appear on the screen
  • 13.
  • 15.
  • 16.
  • 17. ???
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23. For example: byte a = 68; char a = 'A'
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29. No commas or blank spaces are allowed Valid Integer Literals 20 0x56 9978 09 Invalid Integer Literals 5,45 0x 67 89 90 It can be either +ve or –ve. If no sign is there, it will consider +ve by default Valid Integer Literals 20 -56 -978 0999 Invalid Integer Literals 5-45 It must not have a decimal integer Valid Integer Literals 20 -56 -978 0999 Invalid Integer Literals 5.45 0x8.98 087.56
  • 30.
  • 31.
  • 32. Integer Part . Fractional Part Floating Point Number Example 12.90 345.89 67.87
  • 33.
  • 34. • Mantissa is a floating point number in standard notation • Exponent denotes power of 10 • Mantissa and exponent parts are separated by letter E or e
  • 35.
  • 36. Visit unicode.org for detailed table
  • 37.
  • 38. Java language supports few special escape sequences for String and char literals as well. They are: Notation Character represented Abbr Action Performed n Newline/ Line Feed (0x0a) Ascii - 10 NL/ LF insert New Line r Carriage return (0x0d) Ascii - 13 CR return to the beginning of the current line f Formfeed (0x0c) Ascii 12 FF advance downward to the next "page" b Backspace (0x08) s Space (0x20) t tab " Double quote ' Single quote backslash ddd uxxxx Octal character (ddd) Hexadecimal UNICODE character