Inheritance in java

Inheritance in java

Inheritance is the process of object of one class having the properties of objects of another class. The class which shows the properties of...
for each loop

for each loop

The enhanced (extended) for loop in java is called  the for each loop . It is useful for iterating an array. Syntax: for (type var : array) ...
do while

do while

The do while loop is same as a while loop except that here the Boolean condition checks after the execution of the loop body, because of t...
for loop

for loop

Syntax:   for(initialisation; condition; updating)  {   statements;  } Execution flow of a for loop is given bellow. step 1 : Perform the in...
while loop

while loop

Syntax: while(condition) { statements; } It is also same as a for loop. The loop body execution is based on the Boolean condition. The c...
Conditional Operator (?  :)

Conditional Operator (? :)

Syntax for conditional operator available in java is given bellow. variable  = (condition) ? expression-1 : expression-2;  Example:   result...
switch case statement

switch case statement

The switch case is also same as the if else if loop. It also checks multiple conditions for  a single variable or statement. Syntax: switc...