Category: Java

Example of using ArrayList

Example of using ArrayList

In the previous post, we have see how to initialize the ArrayList. In this post, we will example of using ArrayList. ArrayList is a class which implements List Interface. It is an good alternative...

ArrayList in Java

ArrayList in Java

ArrayList: ArrayList is resizable-array implementation of the List interface. It implements all optional list operations, and permits all elements, including null. This class provides methods to manipulate to the size of array that is used...

Initialize the ArrayList in Java

Initialize the ArrayList in Java

Java collection framework was non-generic before JDK 1.5. Since 1.5, it is generic. Java generic collections allows you to have one type of object in collection i.e. you can create collection for String type...

Find out words occurrences in a file

Find out words occurrences in a file

In the previous post, we have seen how to find common elements among 2 unsorted arrays. In this post, we will see how to get the count of same word occurrences in a file....

Regular expression

Regular Expression part 2 in java

In the part 1 , we have seen what is regular expression and its syntax. In part 2, we will understand how to use regular expression with examples. Example 1: We can use any...

Regular expression

Regular expression part 1 in java

In the previous post, we have seen the conditional statements. In this post, we will learn about the regular expression in java. What is regular expression? A regular expression is nothing but a String...

switch case in java

switch case in java

In the previous post, we have seen if..else if conditional statements. In this post, we will learn what is switch case in java. switch case is an alternative of if else statements. It is used to control...

elseif statement in java

elseif statement in java

In the previous post, we have seen if else statement. In this post, we will learn about elseif statements. If we have multiple verification check points, we can use elseif statements. A if statements can be...

if statement in java

if statement in java

In the previous post, we have seen the working of for each loop in java. In this post, we will look at if statement in java. In every programming language, at some point we...