SlideShare a Scribd company logo
1 of 6
Download to read offline
Should begin with a letter and may contain additional letters and digits. Identifiers are the same
as variables.
Use descriptive n Use single letters only for the counter in loops.
Variable names start with lower-case
Multi-word identifiers are internally capitalized
Do not use hyphens or underscores to separate multi-word identifiers.
Need to print extra characters?
What about the unicode set?
This is the format: uHHHH
Remember any other escape characters such as  , t and ?
The following lists some of these conventions based on the type of identifier:
Class name
The first letter of each word is capitalized, examples:
Mammal, SeaMammal
Function name
The first letter of each, except the first, word is capitalized, examples:
getAge, setHeight
Variable name
The first letter of each, except the first, word is capitalized, examples:
age, brainSize
Constant names
Every letter is capitalized and underscores are used between words, examples:
MAX_HEIGHT, MAX_AGE
RESERVED WORDS
As you may have noticed, many of Java's keywords are borrowed from C/C++. Also, as in
C/C++, keywords are always written in lowercase.
Data declaration keywords (boolean, float, int)
Loop keywords (continue, while, for)
Conditional keywords (if, else, switch)
Exception keywords (try, throw, catch)
Structure keywords (class, extends)
Modifier and access keywords (private, public)
Miscellaneous keywords (true, null)
The following keywords and their use, you SHOULD know.
boolean default for private switch
break double if protected this
case else import public throws
catch extends int return try
char final new static void
class float package super while
VARIABLE SCOPE
Where is it appropriate to declare a variable? Does it make a difference?
PRIMITIVE DATA TYPES
int (16-bit)
float (32-bit)
double (64-bit
boolean (true/false)
char (16-bit unicode)
What about String?
What about Integer, and Double?
OBJECTS
Why object oriented programming?
Objects need to be built, so we need constructors.
Instance variables and the role they play when defining objects.
What about methods of an object?
ARRAYS
int[] array = new int[5]; // one-dimensional array
it may also be declared as:
int[] array = {1, 2, 3, 4, 5}; // it is initialized and declared at the same time.
Arrays can be of any primitive data type or object. Arrays have an instance variable "length"
that we can access to find out how big the array is. Remember that an Array can throw an
IndexOutOfBoundsException. Make use of it to make your code safe.
VECTORS
Must import java.util.*;
Unlike arrays, vectors can only hold objects, no primitive data types are allowed. Vectors can
grow big and unbounded. You may want to specify the capacity of the vector but you dont need
to. The default capacity is 10 and it doubles in size every time the capacity is reached.
Just like arrays have the "length" instance variable, Vectors have a .size() method that returns
the current size of the vector.
void .addElement(Object obj)
void .setElementAt(Object obj, int index)
Object .elementAt(int index)
void .insertElementAt(Object obj, int index)
void .removeElementAt(Object obj, int index)
ENUMERATION
This is an iterator and it is very important concept in data structures for ICS211. An Enumeration
lets us visit every element of a Vector one by one.
Vector v = new Vector();
Enumeration e = v.elements();
While(e.hasMoreElements()){
Object o = e.nextElement;
// we do something with each element.
}
OPERATORS AND PRECEDENCE IN JAVA
Pages 436, 437 AND 438
You need to know:
Arithmetic operators in table A7.
Incrementing and decrementing operators int Table A.8.
Good to know but not necessary the Assignment operators in table A.9
Relational operators in table A.10
Logical operators in table A.11
FLOW CONTROL / REPETITION STATEMENTS
Must be familiar with:
for loops
while loops
if statements
switch case statements
The student must be familiar with:
Creating customized classes and methods.
JAVA Applets
JAVA Stand-alone applications
Compiling and running JAVA programs
Solution
Should begin with a letter and may contain additional letters and digits. Identifiers are the same
as variables.
Use descriptive n Use single letters only for the counter in loops.
Variable names start with lower-case
Multi-word identifiers are internally capitalized
Do not use hyphens or underscores to separate multi-word identifiers.
Need to print extra characters?
What about the unicode set?
This is the format: uHHHH
Remember any other escape characters such as  , t and ?
The following lists some of these conventions based on the type of identifier:
Class name
The first letter of each word is capitalized, examples:
Mammal, SeaMammal
Function name
The first letter of each, except the first, word is capitalized, examples:
getAge, setHeight
Variable name
The first letter of each, except the first, word is capitalized, examples:
age, brainSize
Constant names
Every letter is capitalized and underscores are used between words, examples:
MAX_HEIGHT, MAX_AGE
RESERVED WORDS
As you may have noticed, many of Java's keywords are borrowed from C/C++. Also, as in
C/C++, keywords are always written in lowercase.
Data declaration keywords (boolean, float, int)
Loop keywords (continue, while, for)
Conditional keywords (if, else, switch)
Exception keywords (try, throw, catch)
Structure keywords (class, extends)
Modifier and access keywords (private, public)
Miscellaneous keywords (true, null)
The following keywords and their use, you SHOULD know.
boolean default for private switch
break double if protected this
case else import public throws
catch extends int return try
char final new static void
class float package super while
VARIABLE SCOPE
Where is it appropriate to declare a variable? Does it make a difference?
PRIMITIVE DATA TYPES
int (16-bit)
float (32-bit)
double (64-bit
boolean (true/false)
char (16-bit unicode)
What about String?
What about Integer, and Double?
OBJECTS
Why object oriented programming?
Objects need to be built, so we need constructors.
Instance variables and the role they play when defining objects.
What about methods of an object?
ARRAYS
int[] array = new int[5]; // one-dimensional array
it may also be declared as:
int[] array = {1, 2, 3, 4, 5}; // it is initialized and declared at the same time.
Arrays can be of any primitive data type or object. Arrays have an instance variable "length"
that we can access to find out how big the array is. Remember that an Array can throw an
IndexOutOfBoundsException. Make use of it to make your code safe.
VECTORS
Must import java.util.*;
Unlike arrays, vectors can only hold objects, no primitive data types are allowed. Vectors can
grow big and unbounded. You may want to specify the capacity of the vector but you dont need
to. The default capacity is 10 and it doubles in size every time the capacity is reached.
Just like arrays have the "length" instance variable, Vectors have a .size() method that returns
the current size of the vector.
void .addElement(Object obj)
void .setElementAt(Object obj, int index)
Object .elementAt(int index)
void .insertElementAt(Object obj, int index)
void .removeElementAt(Object obj, int index)
ENUMERATION
This is an iterator and it is very important concept in data structures for ICS211. An Enumeration
lets us visit every element of a Vector one by one.
Vector v = new Vector();
Enumeration e = v.elements();
While(e.hasMoreElements()){
Object o = e.nextElement;
// we do something with each element.
}
OPERATORS AND PRECEDENCE IN JAVA
Pages 436, 437 AND 438
You need to know:
Arithmetic operators in table A7.
Incrementing and decrementing operators int Table A.8.
Good to know but not necessary the Assignment operators in table A.9
Relational operators in table A.10
Logical operators in table A.11
FLOW CONTROL / REPETITION STATEMENTS
Must be familiar with:
for loops
while loops
if statements
switch case statements
The student must be familiar with:
Creating customized classes and methods.
JAVA Applets
JAVA Stand-alone applications
Compiling and running JAVA programs

More Related Content

Similar to Should begin with a letter and may contain additional letters and di.pdf

Identifiers, keywords and types
Identifiers, keywords and typesIdentifiers, keywords and types
Identifiers, keywords and typesDaman Toor
 
Unit I Advanced Java Programming Course
Unit I   Advanced Java Programming CourseUnit I   Advanced Java Programming Course
Unit I Advanced Java Programming Courseparveen837153
 
Java: Primitive Data Types
Java: Primitive Data TypesJava: Primitive Data Types
Java: Primitive Data TypesTareq Hasan
 
Arrays in programming
Arrays in programmingArrays in programming
Arrays in programmingTaseerRao
 
Java 7 new features
Java 7 new featuresJava 7 new features
Java 7 new featuresShivam Goel
 
Java căn bản - Chapter9
Java căn bản - Chapter9Java căn bản - Chapter9
Java căn bản - Chapter9Vince Vo
 
OCA Java SE 8 Exam Chapter 3 Core Java APIs
OCA Java SE 8 Exam Chapter 3 Core Java APIsOCA Java SE 8 Exam Chapter 3 Core Java APIs
OCA Java SE 8 Exam Chapter 3 Core Java APIsİbrahim Kürce
 
The second programming assignment (HW4) is designed to help you ga.docx
The second programming assignment (HW4) is designed to help you ga.docxThe second programming assignment (HW4) is designed to help you ga.docx
The second programming assignment (HW4) is designed to help you ga.docxoreo10
 
JavaScript: Core Part
JavaScript: Core PartJavaScript: Core Part
JavaScript: Core Part維佋 唐
 

Similar to Should begin with a letter and may contain additional letters and di.pdf (20)

Identifiers, keywords and types
Identifiers, keywords and typesIdentifiers, keywords and types
Identifiers, keywords and types
 
Array lecture
Array lectureArray lecture
Array lecture
 
Unit I Advanced Java Programming Course
Unit I   Advanced Java Programming CourseUnit I   Advanced Java Programming Course
Unit I Advanced Java Programming Course
 
M C6java2
M C6java2M C6java2
M C6java2
 
Java: Primitive Data Types
Java: Primitive Data TypesJava: Primitive Data Types
Java: Primitive Data Types
 
Arrays in programming
Arrays in programmingArrays in programming
Arrays in programming
 
Java unit 2
Java unit 2Java unit 2
Java unit 2
 
Java fundamentals
Java fundamentalsJava fundamentals
Java fundamentals
 
Java 7 new features
Java 7 new featuresJava 7 new features
Java 7 new features
 
Java Script Introduction
Java Script IntroductionJava Script Introduction
Java Script Introduction
 
PCSTt11 overview of java
PCSTt11 overview of javaPCSTt11 overview of java
PCSTt11 overview of java
 
Java căn bản - Chapter9
Java căn bản - Chapter9Java căn bản - Chapter9
Java căn bản - Chapter9
 
OCA Java SE 8 Exam Chapter 3 Core Java APIs
OCA Java SE 8 Exam Chapter 3 Core Java APIsOCA Java SE 8 Exam Chapter 3 Core Java APIs
OCA Java SE 8 Exam Chapter 3 Core Java APIs
 
Java tutorial PPT
Java tutorial PPTJava tutorial PPT
Java tutorial PPT
 
Java tutorial PPT
Java tutorial  PPTJava tutorial  PPT
Java tutorial PPT
 
The second programming assignment (HW4) is designed to help you ga.docx
The second programming assignment (HW4) is designed to help you ga.docxThe second programming assignment (HW4) is designed to help you ga.docx
The second programming assignment (HW4) is designed to help you ga.docx
 
JavaScript: Core Part
JavaScript: Core PartJavaScript: Core Part
JavaScript: Core Part
 
Basic of java 2
Basic of java  2Basic of java  2
Basic of java 2
 
Java best practices
Java best practicesJava best practices
Java best practices
 
Javascript
JavascriptJavascript
Javascript
 

More from sudhinjv

1.Rule based detection 2.Statical anomaly detection1.Rule based de.pdf
1.Rule based detection 2.Statical anomaly detection1.Rule based de.pdf1.Rule based detection 2.Statical anomaly detection1.Rule based de.pdf
1.Rule based detection 2.Statical anomaly detection1.Rule based de.pdfsudhinjv
 
14 = disease ff24 = carriers Ff25 chances that they will pro.pdf
14 = disease ff24 = carriers Ff25  chances that they will pro.pdf14 = disease ff24 = carriers Ff25  chances that they will pro.pdf
14 = disease ff24 = carriers Ff25 chances that they will pro.pdfsudhinjv
 
Mosses, lichens are great indicators of radioactive pollution. They .pdf
  Mosses, lichens are great indicators of radioactive pollution. They .pdf  Mosses, lichens are great indicators of radioactive pollution. They .pdf
Mosses, lichens are great indicators of radioactive pollution. They .pdfsudhinjv
 
10 million.Sensory conflict theory argues , The brightest light at.pdf
10 million.Sensory conflict theory argues , The brightest light at.pdf10 million.Sensory conflict theory argues , The brightest light at.pdf
10 million.Sensory conflict theory argues , The brightest light at.pdfsudhinjv
 
We first find the slopes of the two lines 2M an.pdf
                     We first find the slopes of the two lines 2M an.pdf                     We first find the slopes of the two lines 2M an.pdf
We first find the slopes of the two lines 2M an.pdfsudhinjv
 
SO2 is a gas that mixes with water to form sulfur.pdf
                     SO2 is a gas that mixes with water to form sulfur.pdf                     SO2 is a gas that mixes with water to form sulfur.pdf
SO2 is a gas that mixes with water to form sulfur.pdfsudhinjv
 
1. Heterozygosity by migration calculated using the below formulaH.pdf
1. Heterozygosity by migration calculated using the below formulaH.pdf1. Heterozygosity by migration calculated using the below formulaH.pdf
1. Heterozygosity by migration calculated using the below formulaH.pdfsudhinjv
 
1).Monohybrid cross between true breeding parents. Assume that the.pdf
1).Monohybrid cross between true breeding parents. Assume that the.pdf1).Monohybrid cross between true breeding parents. Assume that the.pdf
1).Monohybrid cross between true breeding parents. Assume that the.pdfsudhinjv
 
1. Moving down a group, the electronegativity decreases due to the l.pdf
  1. Moving down a group, the electronegativity decreases due to the l.pdf  1. Moving down a group, the electronegativity decreases due to the l.pdf
1. Moving down a group, the electronegativity decreases due to the l.pdfsudhinjv
 
The mercury liquid and the mercury(II) oxide are .pdf
                     The mercury liquid and the mercury(II) oxide are .pdf                     The mercury liquid and the mercury(II) oxide are .pdf
The mercury liquid and the mercury(II) oxide are .pdfsudhinjv
 
1 Ans Bacteria are unicellular organisms that reproduce by cell divi.pdf
1 Ans Bacteria are unicellular organisms that reproduce by cell divi.pdf1 Ans Bacteria are unicellular organisms that reproduce by cell divi.pdf
1 Ans Bacteria are unicellular organisms that reproduce by cell divi.pdfsudhinjv
 
1#include stdio.h#include stdlib.h#include assert.h .pdf
1#include stdio.h#include stdlib.h#include assert.h .pdf1#include stdio.h#include stdlib.h#include assert.h .pdf
1#include stdio.h#include stdlib.h#include assert.h .pdfsudhinjv
 
Ques-6 answerThe clinical significance of beta-hemolytic (on blo.pdf
Ques-6 answerThe clinical significance of beta-hemolytic (on blo.pdfQues-6 answerThe clinical significance of beta-hemolytic (on blo.pdf
Ques-6 answerThe clinical significance of beta-hemolytic (on blo.pdfsudhinjv
 
Valence electrons electrons at outer-most energy level.Effective.pdf
Valence electrons  electrons at outer-most energy level.Effective.pdfValence electrons  electrons at outer-most energy level.Effective.pdf
Valence electrons electrons at outer-most energy level.Effective.pdfsudhinjv
 
What is storage mediaAns-C. the physical material on which a co.pdf
What is storage mediaAns-C. the physical material on which a co.pdfWhat is storage mediaAns-C. the physical material on which a co.pdf
What is storage mediaAns-C. the physical material on which a co.pdfsudhinjv
 
Transactional model of communication states that if people are conne.pdf
Transactional model of communication states that if people are conne.pdfTransactional model of communication states that if people are conne.pdf
Transactional model of communication states that if people are conne.pdfsudhinjv
 
What is the measure of the strength of the relationship between inde.pdf
What is the measure of the strength of the relationship between inde.pdfWhat is the measure of the strength of the relationship between inde.pdf
What is the measure of the strength of the relationship between inde.pdfsudhinjv
 
Some of the SO32- is oxidized by atmospheric oxygen in air into SO42.pdf
Some of the SO32- is oxidized by atmospheric oxygen in air into SO42.pdfSome of the SO32- is oxidized by atmospheric oxygen in air into SO42.pdf
Some of the SO32- is oxidized by atmospheric oxygen in air into SO42.pdfsudhinjv
 
#include iostream #include string #include iomanip #incl.pdf
#include iostream #include string #include iomanip #incl.pdf#include iostream #include string #include iomanip #incl.pdf
#include iostream #include string #include iomanip #incl.pdfsudhinjv
 
Prostomes are mollusca, annelids and arthropods while deuterostomes .pdf
Prostomes are mollusca, annelids and arthropods while deuterostomes .pdfProstomes are mollusca, annelids and arthropods while deuterostomes .pdf
Prostomes are mollusca, annelids and arthropods while deuterostomes .pdfsudhinjv
 

More from sudhinjv (20)

1.Rule based detection 2.Statical anomaly detection1.Rule based de.pdf
1.Rule based detection 2.Statical anomaly detection1.Rule based de.pdf1.Rule based detection 2.Statical anomaly detection1.Rule based de.pdf
1.Rule based detection 2.Statical anomaly detection1.Rule based de.pdf
 
14 = disease ff24 = carriers Ff25 chances that they will pro.pdf
14 = disease ff24 = carriers Ff25  chances that they will pro.pdf14 = disease ff24 = carriers Ff25  chances that they will pro.pdf
14 = disease ff24 = carriers Ff25 chances that they will pro.pdf
 
Mosses, lichens are great indicators of radioactive pollution. They .pdf
  Mosses, lichens are great indicators of radioactive pollution. They .pdf  Mosses, lichens are great indicators of radioactive pollution. They .pdf
Mosses, lichens are great indicators of radioactive pollution. They .pdf
 
10 million.Sensory conflict theory argues , The brightest light at.pdf
10 million.Sensory conflict theory argues , The brightest light at.pdf10 million.Sensory conflict theory argues , The brightest light at.pdf
10 million.Sensory conflict theory argues , The brightest light at.pdf
 
We first find the slopes of the two lines 2M an.pdf
                     We first find the slopes of the two lines 2M an.pdf                     We first find the slopes of the two lines 2M an.pdf
We first find the slopes of the two lines 2M an.pdf
 
SO2 is a gas that mixes with water to form sulfur.pdf
                     SO2 is a gas that mixes with water to form sulfur.pdf                     SO2 is a gas that mixes with water to form sulfur.pdf
SO2 is a gas that mixes with water to form sulfur.pdf
 
1. Heterozygosity by migration calculated using the below formulaH.pdf
1. Heterozygosity by migration calculated using the below formulaH.pdf1. Heterozygosity by migration calculated using the below formulaH.pdf
1. Heterozygosity by migration calculated using the below formulaH.pdf
 
1).Monohybrid cross between true breeding parents. Assume that the.pdf
1).Monohybrid cross between true breeding parents. Assume that the.pdf1).Monohybrid cross between true breeding parents. Assume that the.pdf
1).Monohybrid cross between true breeding parents. Assume that the.pdf
 
1. Moving down a group, the electronegativity decreases due to the l.pdf
  1. Moving down a group, the electronegativity decreases due to the l.pdf  1. Moving down a group, the electronegativity decreases due to the l.pdf
1. Moving down a group, the electronegativity decreases due to the l.pdf
 
The mercury liquid and the mercury(II) oxide are .pdf
                     The mercury liquid and the mercury(II) oxide are .pdf                     The mercury liquid and the mercury(II) oxide are .pdf
The mercury liquid and the mercury(II) oxide are .pdf
 
1 Ans Bacteria are unicellular organisms that reproduce by cell divi.pdf
1 Ans Bacteria are unicellular organisms that reproduce by cell divi.pdf1 Ans Bacteria are unicellular organisms that reproduce by cell divi.pdf
1 Ans Bacteria are unicellular organisms that reproduce by cell divi.pdf
 
1#include stdio.h#include stdlib.h#include assert.h .pdf
1#include stdio.h#include stdlib.h#include assert.h .pdf1#include stdio.h#include stdlib.h#include assert.h .pdf
1#include stdio.h#include stdlib.h#include assert.h .pdf
 
Ques-6 answerThe clinical significance of beta-hemolytic (on blo.pdf
Ques-6 answerThe clinical significance of beta-hemolytic (on blo.pdfQues-6 answerThe clinical significance of beta-hemolytic (on blo.pdf
Ques-6 answerThe clinical significance of beta-hemolytic (on blo.pdf
 
Valence electrons electrons at outer-most energy level.Effective.pdf
Valence electrons  electrons at outer-most energy level.Effective.pdfValence electrons  electrons at outer-most energy level.Effective.pdf
Valence electrons electrons at outer-most energy level.Effective.pdf
 
What is storage mediaAns-C. the physical material on which a co.pdf
What is storage mediaAns-C. the physical material on which a co.pdfWhat is storage mediaAns-C. the physical material on which a co.pdf
What is storage mediaAns-C. the physical material on which a co.pdf
 
Transactional model of communication states that if people are conne.pdf
Transactional model of communication states that if people are conne.pdfTransactional model of communication states that if people are conne.pdf
Transactional model of communication states that if people are conne.pdf
 
What is the measure of the strength of the relationship between inde.pdf
What is the measure of the strength of the relationship between inde.pdfWhat is the measure of the strength of the relationship between inde.pdf
What is the measure of the strength of the relationship between inde.pdf
 
Some of the SO32- is oxidized by atmospheric oxygen in air into SO42.pdf
Some of the SO32- is oxidized by atmospheric oxygen in air into SO42.pdfSome of the SO32- is oxidized by atmospheric oxygen in air into SO42.pdf
Some of the SO32- is oxidized by atmospheric oxygen in air into SO42.pdf
 
#include iostream #include string #include iomanip #incl.pdf
#include iostream #include string #include iomanip #incl.pdf#include iostream #include string #include iomanip #incl.pdf
#include iostream #include string #include iomanip #incl.pdf
 
Prostomes are mollusca, annelids and arthropods while deuterostomes .pdf
Prostomes are mollusca, annelids and arthropods while deuterostomes .pdfProstomes are mollusca, annelids and arthropods while deuterostomes .pdf
Prostomes are mollusca, annelids and arthropods while deuterostomes .pdf
 

Recently uploaded

Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 

Recently uploaded (20)

Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 

Should begin with a letter and may contain additional letters and di.pdf

  • 1. Should begin with a letter and may contain additional letters and digits. Identifiers are the same as variables. Use descriptive n Use single letters only for the counter in loops. Variable names start with lower-case Multi-word identifiers are internally capitalized Do not use hyphens or underscores to separate multi-word identifiers. Need to print extra characters? What about the unicode set? This is the format: uHHHH Remember any other escape characters such as , t and ? The following lists some of these conventions based on the type of identifier: Class name The first letter of each word is capitalized, examples: Mammal, SeaMammal Function name The first letter of each, except the first, word is capitalized, examples: getAge, setHeight Variable name The first letter of each, except the first, word is capitalized, examples: age, brainSize Constant names Every letter is capitalized and underscores are used between words, examples: MAX_HEIGHT, MAX_AGE RESERVED WORDS As you may have noticed, many of Java's keywords are borrowed from C/C++. Also, as in C/C++, keywords are always written in lowercase. Data declaration keywords (boolean, float, int) Loop keywords (continue, while, for) Conditional keywords (if, else, switch) Exception keywords (try, throw, catch) Structure keywords (class, extends) Modifier and access keywords (private, public) Miscellaneous keywords (true, null) The following keywords and their use, you SHOULD know. boolean default for private switch
  • 2. break double if protected this case else import public throws catch extends int return try char final new static void class float package super while VARIABLE SCOPE Where is it appropriate to declare a variable? Does it make a difference? PRIMITIVE DATA TYPES int (16-bit) float (32-bit) double (64-bit boolean (true/false) char (16-bit unicode) What about String? What about Integer, and Double? OBJECTS Why object oriented programming? Objects need to be built, so we need constructors. Instance variables and the role they play when defining objects. What about methods of an object? ARRAYS int[] array = new int[5]; // one-dimensional array it may also be declared as: int[] array = {1, 2, 3, 4, 5}; // it is initialized and declared at the same time. Arrays can be of any primitive data type or object. Arrays have an instance variable "length" that we can access to find out how big the array is. Remember that an Array can throw an IndexOutOfBoundsException. Make use of it to make your code safe. VECTORS Must import java.util.*; Unlike arrays, vectors can only hold objects, no primitive data types are allowed. Vectors can grow big and unbounded. You may want to specify the capacity of the vector but you dont need to. The default capacity is 10 and it doubles in size every time the capacity is reached. Just like arrays have the "length" instance variable, Vectors have a .size() method that returns the current size of the vector.
  • 3. void .addElement(Object obj) void .setElementAt(Object obj, int index) Object .elementAt(int index) void .insertElementAt(Object obj, int index) void .removeElementAt(Object obj, int index) ENUMERATION This is an iterator and it is very important concept in data structures for ICS211. An Enumeration lets us visit every element of a Vector one by one. Vector v = new Vector(); Enumeration e = v.elements(); While(e.hasMoreElements()){ Object o = e.nextElement; // we do something with each element. } OPERATORS AND PRECEDENCE IN JAVA Pages 436, 437 AND 438 You need to know: Arithmetic operators in table A7. Incrementing and decrementing operators int Table A.8. Good to know but not necessary the Assignment operators in table A.9 Relational operators in table A.10 Logical operators in table A.11 FLOW CONTROL / REPETITION STATEMENTS Must be familiar with: for loops while loops if statements switch case statements The student must be familiar with: Creating customized classes and methods. JAVA Applets JAVA Stand-alone applications Compiling and running JAVA programs Solution
  • 4. Should begin with a letter and may contain additional letters and digits. Identifiers are the same as variables. Use descriptive n Use single letters only for the counter in loops. Variable names start with lower-case Multi-word identifiers are internally capitalized Do not use hyphens or underscores to separate multi-word identifiers. Need to print extra characters? What about the unicode set? This is the format: uHHHH Remember any other escape characters such as , t and ? The following lists some of these conventions based on the type of identifier: Class name The first letter of each word is capitalized, examples: Mammal, SeaMammal Function name The first letter of each, except the first, word is capitalized, examples: getAge, setHeight Variable name The first letter of each, except the first, word is capitalized, examples: age, brainSize Constant names Every letter is capitalized and underscores are used between words, examples: MAX_HEIGHT, MAX_AGE RESERVED WORDS As you may have noticed, many of Java's keywords are borrowed from C/C++. Also, as in C/C++, keywords are always written in lowercase. Data declaration keywords (boolean, float, int) Loop keywords (continue, while, for) Conditional keywords (if, else, switch) Exception keywords (try, throw, catch) Structure keywords (class, extends) Modifier and access keywords (private, public) Miscellaneous keywords (true, null) The following keywords and their use, you SHOULD know. boolean default for private switch
  • 5. break double if protected this case else import public throws catch extends int return try char final new static void class float package super while VARIABLE SCOPE Where is it appropriate to declare a variable? Does it make a difference? PRIMITIVE DATA TYPES int (16-bit) float (32-bit) double (64-bit boolean (true/false) char (16-bit unicode) What about String? What about Integer, and Double? OBJECTS Why object oriented programming? Objects need to be built, so we need constructors. Instance variables and the role they play when defining objects. What about methods of an object? ARRAYS int[] array = new int[5]; // one-dimensional array it may also be declared as: int[] array = {1, 2, 3, 4, 5}; // it is initialized and declared at the same time. Arrays can be of any primitive data type or object. Arrays have an instance variable "length" that we can access to find out how big the array is. Remember that an Array can throw an IndexOutOfBoundsException. Make use of it to make your code safe. VECTORS Must import java.util.*; Unlike arrays, vectors can only hold objects, no primitive data types are allowed. Vectors can grow big and unbounded. You may want to specify the capacity of the vector but you dont need to. The default capacity is 10 and it doubles in size every time the capacity is reached. Just like arrays have the "length" instance variable, Vectors have a .size() method that returns the current size of the vector.
  • 6. void .addElement(Object obj) void .setElementAt(Object obj, int index) Object .elementAt(int index) void .insertElementAt(Object obj, int index) void .removeElementAt(Object obj, int index) ENUMERATION This is an iterator and it is very important concept in data structures for ICS211. An Enumeration lets us visit every element of a Vector one by one. Vector v = new Vector(); Enumeration e = v.elements(); While(e.hasMoreElements()){ Object o = e.nextElement; // we do something with each element. } OPERATORS AND PRECEDENCE IN JAVA Pages 436, 437 AND 438 You need to know: Arithmetic operators in table A7. Incrementing and decrementing operators int Table A.8. Good to know but not necessary the Assignment operators in table A.9 Relational operators in table A.10 Logical operators in table A.11 FLOW CONTROL / REPETITION STATEMENTS Must be familiar with: for loops while loops if statements switch case statements The student must be familiar with: Creating customized classes and methods. JAVA Applets JAVA Stand-alone applications Compiling and running JAVA programs