Iterating Statements

For Loop This loop can be used for executing the statements multiple times. A for loop has to be used when we know the exact number of iterations. Syntax:


Rule1: All the three sections of for loop are optional. If we do not specify any initialization and if do not specify […]

Continue reading

Switch Statement

The Switch statement can be used for executing a group of statements based on a value. Syntax


Rule1: Specifying the argument to switch is mandatory and it should be of either byte, short, int or char only. Rule2: Specifying the flower to switch statement is mandatory. Rule3: Specifying the case and default statement in switch […]

Continue reading

Conditional Statements

If-else statement If else statement can be used for executing a group statements based on a condition. Syntax

If the condition is satisfies then it will be executing if block and if the condition is not satisfied then it will be executing else block. Program:

Rule1: Specifying the condition to if else statement […]

Continue reading

Control Statements

The statement of java program will be executed in sequential order. If we dont want to execute the statements in sequential order i.e. if we want to execute the statements in random order according to programmer choice, then we take the help of control statements. The control statements will help the programmer to control the […]

Continue reading


Operator Any symbol that performs an operation will called as operators. Operand: The values on which the operations are performed are called as operands. a  + b Here + Operator a,b are operands Based on the number of operands, the operators are classified into following categories: Unary Operators:  These operators will be perform operations on one […]

Continue reading