java

Fahrenheit to Celsius Program in Java

Fahrenheit to Celsius Program in Java

Operators Program in Java

Operators Program in Java, Java Unary Operator Example: ++ and –,Java Arithmetic Operator Example, Java AND Operator Example: Logical && and Bitwise &

Variables Initialization Program in Java

Variables Initialization Program in Java

Hello World Program in Java

How to create Hello World Program in Java.

Java break and continue

Java break is keyword which is used to going out from “switch” and loops(while, do-while, for). Java continue is also a keyword which is used to going to next condition in loops(while, do-while, for) and going to next case in switch.

Java for

When we want to execute a block execute multiple time then we use loop.It executes until condition is true. The for executes a block of code as long as a given condition is true. It has multiple statements. This is very popular in all loops.

Java do while

When we want to execute a block execute multiple time then we use loop.It executes until condition is true. The do – while executes a block of code as long as a given condition is true.

Java while

When we want to execute a block execute multiple time then we use loop.It executes until condition is true. The while executes a block of code as long as a given condition is true.

Java switch

Java switch statement is used to select one of many code blocks to be executed. How to Java switch works:

Matching each expression with case
Once it match, execute all case from where it matched.
Use break to exit from switch
Use default when expression does not match with any case

Java if else

if Statement Use the if statement to specify a block of Java code to be executed if a condition is true. if (condition) { // block of code to be executed if the condition is true } Sample program with if Write a program or WAP to find a number is greater or not. class […]

1 9 10 11 12