SlideShare une entreprise Scribd logo
1  sur  11
Télécharger pour lire hors ligne
Java Tokens: Keywords, Identifiers, Literals, Operators, and Seperators
A smallest individual unit in source code is known as Token
Java Tokens
Keywords Identifiers Literals Operators Seperators
Keywords are special tokens in the language which have reserved use in the language.
Keywords may not be used as identifiers in Java — you cannot declare a field whose name is a
keyword, for instance.
Java has 50 keywords among which 48 are in use but 2 (goto and const) are currently not in use
Here is a list of keywords in the Java programming language. You cannot use any of the
following as identifiers in your programs. The keywords const and goto are reserved, even
though they are not currently used. true, false, and null might seem like keywords, but they are
actually literals; you cannot use them as identifiers in your programs.
abstract continue for new switch
assert*** default goto* package synchronized
boolean do if private this
break double implements protected throw
byte else import public throws
case enum**** instanceof return transient
catch extends int short try
char final interface static void
class finally long strictfp** volatile
const* float native super while
* not used
** added in
1.2
*** added in
1.4
**** added in
5.0
Identifiers are the names of variables, methods, classes, packages and interfaces.
• Don’t use a keyword
• Don’t use a space
• Don’t use a special symbol other than ( _ and $ )
• Cannot start with digit
• Any length
• If only a single word then use a lowercase
• If more than one word then start first word with lowercase and other words start with first
letter as Capital
For example:
int balance=500; //Single word
int bankBalance=500; //Multiple Words
• Use lowercase
For example:
package pack1;
package mypack1;
• Every word start with first letter as Capital
For example:
class Balance{}
class BankBalance{}
• Use Uppercase and Underscore for separating the words
For example:
int PI=3.14;
int MAX_VALUE=100;
Fixed value assigned to variables or used in expressions is known as Literals
• Integer Literals: for example: 1, -2, 8523, -2105 etc.
Data Type Size Range
byte 1 Byte -27 to 27 -1
short 2 Bytes -215 to 215 -1
int 4 Bytes -231 to 231 -1
long 8 Bytes -263 to 263 -1
• Floating Literals: for example: 1.02, -2.689, 8523.369, 2105 etc.
Data Type Size Range
float 4 Byte -3.4 * 1038 to 3.4 * 1038
double 8 Bytes -1.7 * 10308 to 1.7 * 10308
• Character Literals: for example: ‘A’, ‘B’, ‘@’, ‘&’ etc.
Data Type Size Range
char 2 Bytes All Unicode characters
• String Literals: for example: “Hello”, “Gurpreet Singh”, “ACET” etc.
Data Type Size Range
String 2 * No. of characters As much memory available
• Boolean Literals: true and false.
Data Type Size Range
boolean 1 Byte true or false
• Null Literals: null can be assigned to any reference type
Operators operates on operands. For example: In expression a+b , a & b are operands and +
is operator
• Arithmetic Operator: +, - , *, /, %. For example:
5+4 will result in 9 5-4 will result in 1 5*4 will result in 20 5/4 will result in 1
5%4 will result in 1 (remainder) -5%4 will result in -1 5%-4 will result in 1 -5%-4 will result in -1
Note: Sign of result in % operator depends on the sign of dividend(numerator)
• Relational Operator: <, >, <=, >=, ==, != Output will be either true or false
5>6 will result in false
5>=6 will result in false (either greater than or equal to)
5<6 will result in true
5<=6 will result in true (either less than or equal to)
5==6 will result in false (equal to)
5!=6 will result in true (not equal to)
• Assignment Operator: = Assign the value on left hand side to right hand side. For example:
A=10+5, will assign 15 to A
• Logical Operator: returns true or false
Logical AND (&&)
Logical OR (||)
Logical NOT (!)
A B A&&B A||B !A
true true true true false
true false false true false
false true false true true
false false false false true
• Increment/Decrement Operator: increases or decreases the value by 1
Pre-increment & Pre-decrement: ++a, --a
Post-increment & Post-decrement: a++, a--
• Bitwise Operator: Performs operations on bits
Bitwise AND(&)
Bitwise OR(|)
Bitwise XOR(^)
Bitwise Complement or Not (!)
A B A&B A|B A^B !A
0 0 0 0 1 1
0 1 0 1 0 1
1 0 0 1 0 0
1 1 1 1 1 0
• Shift Operator: shift the bits to left or right
Left Shift(<<): shifts the bits to left and fill the vacant spaces with 0
Unsigned Right Shift(>>>): shifts the bits to right and fill the vacant spaces with 0
Signed Right Shift(>>): shifts the bits to right and fill the vacant spaces with leftmost bit, i.e. if
leftmost bit is 0 then fill with 0, and if the leftmost bit is 1 then fill with 1
• Conditional(Ternary) Operator:
Syntax: condition(relational expression) ? Expression 1 : Expression 2
If condition evaluates to true then result will be Expression 1 otherwise Expression 2
{ } used to define block or to declare array with static elements
[ ] used to declare array variable
( ) used to define/call function or used in expressions
; used to terminate a statement
, used to separate variables in declaration
. used to access data members and member functions of an object or class

Contenu connexe

Tendances

Intro To BOOST.Spirit
Intro To BOOST.SpiritIntro To BOOST.Spirit
Intro To BOOST.SpiritWill Shen
 
Java 8 Functional Programming - I
Java 8 Functional Programming - IJava 8 Functional Programming - I
Java 8 Functional Programming - IUgur Yeter
 
Variable, constant, operators and control statement
Variable, constant, operators and control statementVariable, constant, operators and control statement
Variable, constant, operators and control statementEyelean xilef
 
Data types and operators in vb
Data types and operators  in vbData types and operators  in vb
Data types and operators in vballdesign
 
Python Built-in Functions and Use cases
Python Built-in Functions and Use casesPython Built-in Functions and Use cases
Python Built-in Functions and Use casesSrajan Mor
 
Complete Tokens in c/c++
Complete Tokens in c/c++Complete Tokens in c/c++
Complete Tokens in c/c++Shobi P P
 
Functions in python slide share
Functions in python slide shareFunctions in python slide share
Functions in python slide shareDevashish Kumar
 
Pseudocode basics
Pseudocode basicsPseudocode basics
Pseudocode basicskiran_kaur
 
Doppl development iteration #5
Doppl development   iteration #5Doppl development   iteration #5
Doppl development iteration #5Diego Perini
 
20130329 introduction to linq
20130329 introduction to linq20130329 introduction to linq
20130329 introduction to linqLearningTech
 
Compiler: Programming Language= Assignments and statements
Compiler: Programming Language= Assignments and statementsCompiler: Programming Language= Assignments and statements
Compiler: Programming Language= Assignments and statementsGeo Marian
 
Operators , Functions and Options in VB.NET
Operators , Functions and Options in VB.NETOperators , Functions and Options in VB.NET
Operators , Functions and Options in VB.NETShyam Sir
 
Write codeforhumans
Write codeforhumansWrite codeforhumans
Write codeforhumansNarendran R
 
Handout # 4 functions + scopes
Handout # 4   functions + scopes Handout # 4   functions + scopes
Handout # 4 functions + scopes NUST Stuff
 

Tendances (20)

Intro To BOOST.Spirit
Intro To BOOST.SpiritIntro To BOOST.Spirit
Intro To BOOST.Spirit
 
Java 8 Functional Programming - I
Java 8 Functional Programming - IJava 8 Functional Programming - I
Java 8 Functional Programming - I
 
Variable, constant, operators and control statement
Variable, constant, operators and control statementVariable, constant, operators and control statement
Variable, constant, operators and control statement
 
Data types and operators in vb
Data types and operators  in vbData types and operators  in vb
Data types and operators in vb
 
Python Built-in Functions and Use cases
Python Built-in Functions and Use casesPython Built-in Functions and Use cases
Python Built-in Functions and Use cases
 
Complete Tokens in c/c++
Complete Tokens in c/c++Complete Tokens in c/c++
Complete Tokens in c/c++
 
Lexical1
Lexical1Lexical1
Lexical1
 
Python Functions
Python   FunctionsPython   Functions
Python Functions
 
Functions in python slide share
Functions in python slide shareFunctions in python slide share
Functions in python slide share
 
Pseudocode basics
Pseudocode basicsPseudocode basics
Pseudocode basics
 
ALGOL ailesi programlama dilleri
ALGOL ailesi programlama dilleriALGOL ailesi programlama dilleri
ALGOL ailesi programlama dilleri
 
Operators in java
Operators in javaOperators in java
Operators in java
 
Doppl development iteration #5
Doppl development   iteration #5Doppl development   iteration #5
Doppl development iteration #5
 
JDK8 Lambda expressions demo
JDK8 Lambda expressions demoJDK8 Lambda expressions demo
JDK8 Lambda expressions demo
 
20130329 introduction to linq
20130329 introduction to linq20130329 introduction to linq
20130329 introduction to linq
 
Compiler: Programming Language= Assignments and statements
Compiler: Programming Language= Assignments and statementsCompiler: Programming Language= Assignments and statements
Compiler: Programming Language= Assignments and statements
 
Functions in Python
Functions in PythonFunctions in Python
Functions in Python
 
Operators , Functions and Options in VB.NET
Operators , Functions and Options in VB.NETOperators , Functions and Options in VB.NET
Operators , Functions and Options in VB.NET
 
Write codeforhumans
Write codeforhumansWrite codeforhumans
Write codeforhumans
 
Handout # 4 functions + scopes
Handout # 4   functions + scopes Handout # 4   functions + scopes
Handout # 4 functions + scopes
 

En vedette

Стимулювання філологічної творчості учнів
Стимулювання філологічної творчості учнівСтимулювання філологічної творчості учнів
Стимулювання філологічної творчості учнівA I
 
Presentation1 !
Presentation1 !Presentation1 !
Presentation1 !quchil
 
ייעוץ ארגוני
ייעוץ ארגוניייעוץ ארגוני
ייעוץ ארגוניshirasegev2015
 
CWE_Vol10_Spl(1)_p_672-689
CWE_Vol10_Spl(1)_p_672-689CWE_Vol10_Spl(1)_p_672-689
CWE_Vol10_Spl(1)_p_672-689shaham asadi
 
Nbhm m. a. and m.sc. scholarship test 2008
Nbhm m. a. and m.sc. scholarship test 2008Nbhm m. a. and m.sc. scholarship test 2008
Nbhm m. a. and m.sc. scholarship test 2008MD Kutubuddin Sardar
 
COMM 303 Final Project - Kyle Bolin
COMM 303 Final Project - Kyle BolinCOMM 303 Final Project - Kyle Bolin
COMM 303 Final Project - Kyle BolinKyleBolin14
 
Engeneering volunteering - What can Wikimedia do better?
Engeneering volunteering - What can Wikimedia do better?Engeneering volunteering - What can Wikimedia do better?
Engeneering volunteering - What can Wikimedia do better?Rebecca Cotton
 
20150804__物管質量培力__#03行動
20150804__物管質量培力__#03行動20150804__物管質量培力__#03行動
20150804__物管質量培力__#03行動ASIA 龔文周
 
Педагогічна творчість як провідна детермінанта дитячої творчості
Педагогічна творчість як провідна детермінанта дитячої творчостіПедагогічна творчість як провідна детермінанта дитячої творчості
Педагогічна творчість як провідна детермінанта дитячої творчостіA I
 
Ivf scupper-the-supplements
Ivf scupper-the-supplementsIvf scupper-the-supplements
Ivf scupper-the-supplementsIndira IVF
 

En vedette (16)

Стимулювання філологічної творчості учнів
Стимулювання філологічної творчості учнівСтимулювання філологічної творчості учнів
Стимулювання філологічної творчості учнів
 
Presentation1 !
Presentation1 !Presentation1 !
Presentation1 !
 
Ux5
Ux5Ux5
Ux5
 
ייעוץ ארגוני
ייעוץ ארגוניייעוץ ארגוני
ייעוץ ארגוני
 
CWE_Vol10_Spl(1)_p_672-689
CWE_Vol10_Spl(1)_p_672-689CWE_Vol10_Spl(1)_p_672-689
CWE_Vol10_Spl(1)_p_672-689
 
new clock CATALOGUE
new clock CATALOGUEnew clock CATALOGUE
new clock CATALOGUE
 
Nbhm m. a. and m.sc. scholarship test 2008
Nbhm m. a. and m.sc. scholarship test 2008Nbhm m. a. and m.sc. scholarship test 2008
Nbhm m. a. and m.sc. scholarship test 2008
 
COMM 303 Final Project - Kyle Bolin
COMM 303 Final Project - Kyle BolinCOMM 303 Final Project - Kyle Bolin
COMM 303 Final Project - Kyle Bolin
 
E info solutions
E info solutionsE info solutions
E info solutions
 
Engeneering volunteering - What can Wikimedia do better?
Engeneering volunteering - What can Wikimedia do better?Engeneering volunteering - What can Wikimedia do better?
Engeneering volunteering - What can Wikimedia do better?
 
Eng
EngEng
Eng
 
20150804__物管質量培力__#03行動
20150804__物管質量培力__#03行動20150804__物管質量培力__#03行動
20150804__物管質量培力__#03行動
 
Педагогічна творчість як провідна детермінанта дитячої творчості
Педагогічна творчість як провідна детермінанта дитячої творчостіПедагогічна творчість як провідна детермінанта дитячої творчості
Педагогічна творчість як провідна детермінанта дитячої творчості
 
Docenić bibliotekę - o budowaniu strategii rzecznictwa w bibliotekach
Docenić bibliotekę - o budowaniu strategii rzecznictwa w bibliotekachDocenić bibliotekę - o budowaniu strategii rzecznictwa w bibliotekach
Docenić bibliotekę - o budowaniu strategii rzecznictwa w bibliotekach
 
CV - Jul 2015
CV - Jul 2015CV - Jul 2015
CV - Jul 2015
 
Ivf scupper-the-supplements
Ivf scupper-the-supplementsIvf scupper-the-supplements
Ivf scupper-the-supplements
 

Similaire à Java ppt2

IOS Swift Language 3rd tutorial
IOS Swift Language 3rd tutorialIOS Swift Language 3rd tutorial
IOS Swift Language 3rd tutorialHassan A-j
 
python presentation.pptx
python presentation.pptxpython presentation.pptx
python presentation.pptxNightTune44
 
L3 operators
L3 operatorsL3 operators
L3 operatorsteach4uin
 
L3 operators
L3 operatorsL3 operators
L3 operatorsteach4uin
 
L3 operators
L3 operatorsL3 operators
L3 operatorsteach4uin
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
Lecture 2 variables
Lecture 2 variablesLecture 2 variables
Lecture 2 variablesTony Apreku
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++Neeru Mittal
 
4_A1208223655_21789_2_2018_04. Operators.ppt
4_A1208223655_21789_2_2018_04. Operators.ppt4_A1208223655_21789_2_2018_04. Operators.ppt
4_A1208223655_21789_2_2018_04. Operators.pptRithwikRanjan
 
C – A Programming Language- I
C – A Programming Language- IC – A Programming Language- I
C – A Programming Language- IGagan Deep
 
Chapter 01 Introduction to Java by Tushar B Kute
Chapter 01 Introduction to Java by Tushar B KuteChapter 01 Introduction to Java by Tushar B Kute
Chapter 01 Introduction to Java by Tushar B KuteTushar B Kute
 
chapter-3-engdata-handling1_1585929972520 by EasePDF.pptx
chapter-3-engdata-handling1_1585929972520 by EasePDF.pptxchapter-3-engdata-handling1_1585929972520 by EasePDF.pptx
chapter-3-engdata-handling1_1585929972520 by EasePDF.pptxJahnavi113937
 

Similaire à Java ppt2 (20)

unit1 python.pptx
unit1 python.pptxunit1 python.pptx
unit1 python.pptx
 
IOS Swift Language 3rd tutorial
IOS Swift Language 3rd tutorialIOS Swift Language 3rd tutorial
IOS Swift Language 3rd tutorial
 
python presentation.pptx
python presentation.pptxpython presentation.pptx
python presentation.pptx
 
L3 operators
L3 operatorsL3 operators
L3 operators
 
L3 operators
L3 operatorsL3 operators
L3 operators
 
L3 operators
L3 operatorsL3 operators
L3 operators
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Py-Slides-2 (1).ppt
Py-Slides-2 (1).pptPy-Slides-2 (1).ppt
Py-Slides-2 (1).ppt
 
Py-Slides-2.ppt
Py-Slides-2.pptPy-Slides-2.ppt
Py-Slides-2.ppt
 
Py-Slides-2.ppt
Py-Slides-2.pptPy-Slides-2.ppt
Py-Slides-2.ppt
 
Lecture 2 variables
Lecture 2 variablesLecture 2 variables
Lecture 2 variables
 
C++
C++ C++
C++
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++
 
4_A1208223655_21789_2_2018_04. Operators.ppt
4_A1208223655_21789_2_2018_04. Operators.ppt4_A1208223655_21789_2_2018_04. Operators.ppt
4_A1208223655_21789_2_2018_04. Operators.ppt
 
#Code2 create c++ for beginners
#Code2 create  c++ for beginners #Code2 create  c++ for beginners
#Code2 create c++ for beginners
 
Java chapter 2
Java chapter 2Java chapter 2
Java chapter 2
 
Python unit 1 (1).pptx
Python unit 1 (1).pptxPython unit 1 (1).pptx
Python unit 1 (1).pptx
 
C – A Programming Language- I
C – A Programming Language- IC – A Programming Language- I
C – A Programming Language- I
 
Chapter 01 Introduction to Java by Tushar B Kute
Chapter 01 Introduction to Java by Tushar B KuteChapter 01 Introduction to Java by Tushar B Kute
Chapter 01 Introduction to Java by Tushar B Kute
 
chapter-3-engdata-handling1_1585929972520 by EasePDF.pptx
chapter-3-engdata-handling1_1585929972520 by EasePDF.pptxchapter-3-engdata-handling1_1585929972520 by EasePDF.pptx
chapter-3-engdata-handling1_1585929972520 by EasePDF.pptx
 

Plus de nikhilsh66131

Plus de nikhilsh66131 (8)

Pl sql
Pl sqlPl sql
Pl sql
 
Pl sql
Pl sqlPl sql
Pl sql
 
Pl sql
Pl sqlPl sql
Pl sql
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Html beginners tutorial
Html beginners tutorialHtml beginners tutorial
Html beginners tutorial
 
Bubble and-merge-sort
Bubble and-merge-sortBubble and-merge-sort
Bubble and-merge-sort
 
Java ppt2
Java ppt2Java ppt2
Java ppt2
 
Java ppt1
Java ppt1Java ppt1
Java ppt1
 

Dernier

Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 

Dernier (20)

FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 

Java ppt2

  • 1. Java Tokens: Keywords, Identifiers, Literals, Operators, and Seperators
  • 2. A smallest individual unit in source code is known as Token Java Tokens Keywords Identifiers Literals Operators Seperators
  • 3. Keywords are special tokens in the language which have reserved use in the language. Keywords may not be used as identifiers in Java — you cannot declare a field whose name is a keyword, for instance. Java has 50 keywords among which 48 are in use but 2 (goto and const) are currently not in use Here is a list of keywords in the Java programming language. You cannot use any of the following as identifiers in your programs. The keywords const and goto are reserved, even though they are not currently used. true, false, and null might seem like keywords, but they are actually literals; you cannot use them as identifiers in your programs. abstract continue for new switch assert*** default goto* package synchronized boolean do if private this break double implements protected throw byte else import public throws case enum**** instanceof return transient catch extends int short try char final interface static void class finally long strictfp** volatile const* float native super while * not used ** added in 1.2 *** added in 1.4 **** added in 5.0
  • 4. Identifiers are the names of variables, methods, classes, packages and interfaces. • Don’t use a keyword • Don’t use a space • Don’t use a special symbol other than ( _ and $ ) • Cannot start with digit • Any length • If only a single word then use a lowercase • If more than one word then start first word with lowercase and other words start with first letter as Capital For example: int balance=500; //Single word int bankBalance=500; //Multiple Words
  • 5. • Use lowercase For example: package pack1; package mypack1; • Every word start with first letter as Capital For example: class Balance{} class BankBalance{} • Use Uppercase and Underscore for separating the words For example: int PI=3.14; int MAX_VALUE=100;
  • 6. Fixed value assigned to variables or used in expressions is known as Literals • Integer Literals: for example: 1, -2, 8523, -2105 etc. Data Type Size Range byte 1 Byte -27 to 27 -1 short 2 Bytes -215 to 215 -1 int 4 Bytes -231 to 231 -1 long 8 Bytes -263 to 263 -1 • Floating Literals: for example: 1.02, -2.689, 8523.369, 2105 etc. Data Type Size Range float 4 Byte -3.4 * 1038 to 3.4 * 1038 double 8 Bytes -1.7 * 10308 to 1.7 * 10308
  • 7. • Character Literals: for example: ‘A’, ‘B’, ‘@’, ‘&’ etc. Data Type Size Range char 2 Bytes All Unicode characters • String Literals: for example: “Hello”, “Gurpreet Singh”, “ACET” etc. Data Type Size Range String 2 * No. of characters As much memory available • Boolean Literals: true and false. Data Type Size Range boolean 1 Byte true or false • Null Literals: null can be assigned to any reference type
  • 8. Operators operates on operands. For example: In expression a+b , a & b are operands and + is operator • Arithmetic Operator: +, - , *, /, %. For example: 5+4 will result in 9 5-4 will result in 1 5*4 will result in 20 5/4 will result in 1 5%4 will result in 1 (remainder) -5%4 will result in -1 5%-4 will result in 1 -5%-4 will result in -1 Note: Sign of result in % operator depends on the sign of dividend(numerator) • Relational Operator: <, >, <=, >=, ==, != Output will be either true or false 5>6 will result in false 5>=6 will result in false (either greater than or equal to) 5<6 will result in true 5<=6 will result in true (either less than or equal to) 5==6 will result in false (equal to) 5!=6 will result in true (not equal to)
  • 9. • Assignment Operator: = Assign the value on left hand side to right hand side. For example: A=10+5, will assign 15 to A • Logical Operator: returns true or false Logical AND (&&) Logical OR (||) Logical NOT (!) A B A&&B A||B !A true true true true false true false false true false false true false true true false false false false true • Increment/Decrement Operator: increases or decreases the value by 1 Pre-increment & Pre-decrement: ++a, --a Post-increment & Post-decrement: a++, a--
  • 10. • Bitwise Operator: Performs operations on bits Bitwise AND(&) Bitwise OR(|) Bitwise XOR(^) Bitwise Complement or Not (!) A B A&B A|B A^B !A 0 0 0 0 1 1 0 1 0 1 0 1 1 0 0 1 0 0 1 1 1 1 1 0 • Shift Operator: shift the bits to left or right Left Shift(<<): shifts the bits to left and fill the vacant spaces with 0 Unsigned Right Shift(>>>): shifts the bits to right and fill the vacant spaces with 0 Signed Right Shift(>>): shifts the bits to right and fill the vacant spaces with leftmost bit, i.e. if leftmost bit is 0 then fill with 0, and if the leftmost bit is 1 then fill with 1 • Conditional(Ternary) Operator: Syntax: condition(relational expression) ? Expression 1 : Expression 2 If condition evaluates to true then result will be Expression 1 otherwise Expression 2
  • 11. { } used to define block or to declare array with static elements [ ] used to declare array variable ( ) used to define/call function or used in expressions ; used to terminate a statement , used to separate variables in declaration . used to access data members and member functions of an object or class