Week-2.-Java-Programming-Concepts
Week-2.-Java-Programming-Concepts
JAVA
ting with Company A
PROGRAMMING
CONCEPTS
CPE 206L Data Structure and AlgorithmsJUNE 15, 2021 - 18H
Meeting with Company A
ENGR. WENDY E. OLLERO JUNE 15, 2021 - 15H
Instructor Meeting with Company A
JUNE 15, 2021 - 15H
Meeting with Company A
MARCH 22, 2021 - 15H
Kinds of Java Applications
Syntax,
Keywords
and
Identifier
// JAVA CONCEPTS
KEYWORDS
KEYWORDS
// JAVA CONCEPTS
IDENTIFIER
IDENTIFIER
IDENTIFIER
● mySum
● num1
● student_no
● a2
// JAVA CONCEPTS
SYNTAX
SYNTAX
Datatype identifier;
Datatype identifier = Value;
int age;
int age = 23;
// JAVA CONCEPTS
COMMENTS
COMMENTS
Single-line comments start with two forward
slashes (//).
// JAVA CONCEPTS
COMMENTS
Multi-line comments start with /* and ends
with */.
// JAVA CONCEPTS
WHITESPACE
ESCAPE SEQUENCES
● is a special character sequence that
represents another character.
● Each of these special character
sequences starts with a backslash, which
is followed by another character.
● are used to represent characters that
cannot be used directly in a string
// JAVA CONCEPTS
ESCAPE SEQUENCES
// JAVA CONCEPTS
VARIABLE
VARIABLE
// JAVA CONCEPTS
DATA TYPES
DATA TYPES
DATA TYPES
// JAVA CONCEPTS
DATA TYPES
Data types are divided into two groups:
DATA TYPES
// JAVA CONCEPTS
EXPRESSION
● is a value, a variable, a method, or one of
their combinations that can be evaluated
to a value.
// JAVA CONCEPTS
STATEMENT
● is any complete sentence that causes
some action to occur.
● A valid Java statement must end with a
semicolon.
JAVA
OPERATORS
JAVA OPERATORS
CONCATENATION
CONCATENATION
“Hello” + “World”
“2” + “3” NOT Concatenation
‘a + “b” 23
2 “3” ‘a’ 3
SENTENCE BUILDER CHALLENGE
THANKS!
DO YOU HAVE ANY QUESTIONS?
wendy.ollero@bulsu.edu.ph