Do While Loop In Java

The do-while is similar to the while loop . In do-while loop, the condition is evaluated after the execution of statements with in the do…

Encapsulation in Java | Java Tutorial

Encapsulation is a mechanism of binding code and data together in a single unit. Let’s take an example of Capsule. Different powdered or liquid medicines…

Enhanced For Loop in Java

In the previous post, we learnt For Loop in Java . In this post we will see Enhanced For Loop. The Enhanced For Loop is…

Exception Handling in Java

The Java programming language uses exceptions to handle errors and other exceptional events. What is an Exception: An exception is an event that interrupts the…

For Loop In Java | Java Tutorial

The for statement in Java allows us to repeatedly loops until a particular condition is satisfied. Check this post to learn enhanced for loop (for…

How To Convert Array to ArrayList

Let’s see some sample programs on how to convert Array to ArrayList Sample Program 1: package classFiveArrays;import java.util.ArrayList;import java.util.Arrays;import java.util.Collections;public class ConvertArrayToArrayList { public static…