Tagged: java programming language

Java While Loop 0

Java While Loop

Java While Loop is used to execute a program code many times which is not fixed. Syntax: while(condition to test){ // execute this code } Java While Loop Example   public class JavaWhileLoop {...


If-else Statement in Java

If-else Statement in Java is used to test conditions.The return type for an if statement is either true or false.There are different types of if statements in Java:- if statement if-else statement nested if...


Data types and Variables in Java

Variable is a memory location in a program.There are three types of variables that a Java program can have. 1.local variable. 2Instance variable. 3.Static variable. Variables can be changed, i.e., they can be varied.We...