Java

Java Class and Objects

In this article, you will be introduced with the basic OOPs concept i.e. Classes and Objects and how you can create classes and objects in your Java program. Java Objects Object refers to an entity that has state and behavior.  State: represents the data (properties) of an object. Behavior: represents the behavior (functionality) of an …

Java Class and ObjectsRead More »

Java do-while Loop

In this article, you will learn about the do-while loop and how to create do-while loop in Java programming. Loops in Java are used when we want to execute a block of statements repeatedly until a specific condition is met(condition is false). Java do-while Loop Java do-while loop is an exit-control loop, which means unlike while loop, …

Java do-while LoopRead More »

Java switch Statement

In this article, you will learn to use switch statement to control the flow of your program’s execution. Java switch Statement When we want to execute a particular block of code/statements among many blocks we can use switch statement. Syntax // switch statement switch(expression/variable) { // case statements // values must be of same type …

Java switch StatementRead More »

Java if…else

In this article, you will learn to use selection statements if, if-else, if-else-if to control the flow of execution of a program based on certain conditions. Selection statements also known as conditional statements allows a program to test several conditions, and execute instructions based on which condition is true. The conditional statements: if statement if-else …

Java if…elseRead More »

%d bloggers like this: