Browsing category Java

Looping in Java


Loops allow us to repeat the same set of instructions a number of times until a certain pre-specified condition is met. There are different looping statements in Java. for loop

Output

while loop

Output

do…while loop

Output

Conditional Statements in Java


Conditional statements are used to compare two data types of values in Java. You can use if, if…else and switch statements for this purpose. If and If…else These statements compare values and follow the steps based on whether the comparison is true or false. Example:

Output

Switch The switch statement also compares values

Hello World in Java

Hello World I’m Learning Java Programming


I decided to learn Java Programming since it is really popular and I have a goal of learning how to develop Android applications. I thought I would get started with it. So, the first thing you have to do is install Java SE. It contains both Java Development Kit (JDK) and Java Runtime Environment (JRE).