`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
What is Hadoop?
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
➢ Variables
➢ Data types
➢ Operators
➢ Conditional Statements
➢ Loops
➢ Arrays and Strings
➢ Functions
➢ Classes and Objects
Agenda
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Java Installation
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Eclipse Installation
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Variables
Data types
Operators
Conditional
Statements
Loops Functions
Classes and
Objects
Arrays &
Strings
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Variable
Variables are nothing but reserved memory locations to store values. This means that
when you create a variable you reserve some space in memory.
int X = 25;
float Y = 3.142857;
boolean B = true;
B = true
Y = 3.142857
X = 25
Memory
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Operators
Conditional
Statements
Loops Functions
Classes and
Objects
Arrays &
Strings
Variables
Data types
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Data types
A data type, in programming, is a classification that specifies which type of value a variable
has and what type of mathematical, relational or logical operations can be applied to it
without causing an error.
int X = 25;
float Y = 3.142857;
boolean B = true;
B = true
Y = 3.142857
X = 25
Memory
Integer
Float
Boolean
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Data types
Data types
Integer
Float
Character
Boolean
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Character
Boolean
Integer1
3
4
Float32
Numeric Data type
 Integer data types are used to store numeric values.
 There are four different integer types in Java:
-128 to 127
-32768 to 32167
-2147483648 to 2147483647
-9,223,372,036,854,775,808 to
9,223,372,036,854,775,807
byte Type
short Type
int Type
long Type
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Character
Boolean
Integer1
3
4
Float3
2
Float Data type
 Float data types are used to store numeric values along
with their decimal value.
 There are two different float types in Java:
float Type
double Type
Âą3.40282347E+38F
Âą1.79769313486231570E+308
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Boolean
Integer1
Character3
4
Float32
Character Data type
 Character data types are used to store character values.
 char data type is a single 16-bit Unicode character:
char Type 0 to 65,535
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Character
Integer1
3
Boolean4
Float32
Boolean Data type
boolean Type True or false
 Boolean data types are used to store boolean values along.
 This data type is used for simple flags that track true/false
conditions
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Conditional
Statements
Loops Functions
Classes and
Objects
Arrays &
Strings
Variables
Data types
Operators
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Data Operations
Operators
Relational
Operators
Arithmetic
Operators
Logical
Operators
Unary
Operators
Operations Operators are the constructs which can manipulate the value of operands.
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Arithmetic and Relational Operators
Arithmetic
a + b
a – b
a * b
a / b
a % b
Addition
Multiplication
Subtraction
Division
Modulus
a == b
a != b
a > b
a < b
a >= b
a <= b
Equal To
Greater Than
Not Equal To
Less Than
Greater Than Equal To
Less Than Equal To
Relational
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Unary Operator
There are two types of unary operators: Increment and Decrement
Increment
Decrement
Pre increment
Post increment
Pre decrement
Post decrement
++i
i++
--i
i--
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Logical Operator
There are three types of logical operators: Logical AND, Logical NOT, Logical OR
a and b
a or b
Returns a if a is false, b otherwise
Returns b if b is false, a otherwise
not a
Returns true if a is false, false
otherwise
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Operators
Conditional
Statements
Loops Functions
Classes and
Objects
Arrays &
Strings
Variables
Data types
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Conditional Statements
If Statement
If code
End
Start
If
Condition
FALSETRUE
Syntax:
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Conditional Statements
Else If Statement
If code
End
Start
If
Condition
FALSE
TRUE
FALSE
Else If
Condition
TRUE
Else If code
Syntax:
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Conditional Statements
Else Statement
Syntax:
If code
End
Start
If
Condition
FALSE
TRUE
FALSE
Else If
Condition
TRUE
Else If code
Else code
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Conditional Statements
Switch case Statement
Syntax:
Start
switch
Condition
Case value1 Statement 1 break
Case value2 Statement 2 break
Case value3 Statement 3 break
default Statement
End
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Conditional
Statements
Operators Functions
Classes and
Objects
Arrays &
Strings
Variables
Data types
Loops
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Loops in Java
A loop statement allows us to execute a statement or group of statements
multiple times. The following diagram illustrates a loop statement:
Loops
Loops
forwhiledo while
CHECK
CONDITION
EXECUTE BLOCK
START
EXIT LOOP
FALSE
TRUErepeat
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Do While Loop
Do While Loop Repeats a statement or group of statements while a given condition is TRUE. It
tests the condition after executing the loop body.
Syntax:
CHECK
CONDITION
EXECUTE BLOCK
START
EXIT LOOP
FALSE
TRUE
repeat
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
While Loop
While Loop Repeats a statement or group of statements while a given condition is TRUE. It
tests the condition before executing the loop body.
Syntax:
CHECK
CONDITION
EXECUTE BLOCK
START
repeat
EXIT LOOP
FALSE
TRUE
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
For Loop
For Loop Repeats a statement or group of for a fixed number of times. It tests the
condition before executing the loop body.
Syntax:
Check
condition
Initialization
START
Iteration
Execute Statements
Exit loop
FALSE
TRUE
repeat
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Loops
Arrays &
Strings
Conditional
Statements
Operators Functions
Classes and
Objects
Variables
Data types
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
 An array is a data structure which holds the sequential elements of the same type.
 Arrays of any type can be created and may have one or more dimensions.
Array In Java
0 1 2 3 4
126 32 230 21 200
Index
Value
E.g: array index 4 is
holding a value of 200
Each index in the array
holds a value.
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
 Arrays can be of 2 types:
Array In Java
Single Dimensional Array
Initialization: int a[] = new int[12]
Initialization: int table[][] = new int[4][5];
Table[2][2] = 13
Multi Dimensional Array
0 1 2 3 4
0
1
2
3
Width = 5
Height =4
Index in Y dimension
Index in
X dimension
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
 String is a data structure which holds the sequential character.
 In Java programming language, strings are treated as objects.
String In Java
0 1 2 3 4 5
H e l l o 0
Initialization: String str = “Hello”
Str[0] Str[1] Str[2] Str[3] Str[4] Str[5]
www.edureka.co/devopsEDUREKA DEVOPS CERTIFICATION TRAINING
Functions
Loops
Conditional
Statements
Operators
Classes and
Objects
Variables
Data types
Arrays &
Strings
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Functions
A function is a block of organized, reusable code that is used to perform a
single, related action.
Functions
Predefined
Functions
User Defined
Functions
Function Add
Call (3,5)
Call (6,9)
Call (1,5)
Call 1
Call 2
Call 3
Return 8
Return 15
Return 6
Functions In Java
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Functions
Classes and
Objects
Loops
Conditional
Statements
OperatorsVariables
Data types
Arrays &
Strings
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Classes and Objects in Python
Classes and Objects
 A class is the blueprint from which specific objects are created.
 Anything that has a state and behavior is object.
Class
Object
`
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Session In A Minute
Install Java Data types, Operators
Loops Functions
Conditional Statements
Classes and Objects
Java Programming | Java Tutorial For Beginners | Java Training | Edureka

Java Programming | Java Tutorial For Beginners | Java Training | Edureka