java

java

Java string compareToIgnoreCase and compareTo methods

Java String methods compareToIgnoreCase and compareTo can be used to compare two strings. In this tutorial, we will learn how these methods work with examples.

Read
java

Java example program to create one ArrayList of ArrayList

In this quick Java programming tutorial, I will show you how to create one ArrayList of ArrayList, i.e. an ArrayList with ArrayList elements.  The program will take all inputs from the user. It will take the ArrayList inputs and then print out the result.

Read
java

Java compareToIgnoreCase method explanation with an example

compareToIgnoreCase is a public method in the String class of Java. We can use this method to compare two Strings lexicographically and ignoring the case.The provided string is normalized by using Character.toLowerCase(Character.toUpperCase(character)) on each character of the String.

Read
java

Java program to clear a vector or delete all elements of a vector

In this post, we will learn how to clear a vector in Java. A vector is like a dynamic array in Java. It doesn't have any fixed length. We can add as many items as we want to a vector.

Read
java

Java program to check if a number is a buzz number or not

In this java buzz programming tutorial, we will learn how to check if a number is buzz or not.

Read
java

Java string intern method explanation with an example

Java string intern() method is one of the important methods of String class. This method returns an interned string or canonical representation of a string.

Read
java

Difference between Java compareToIgnoreCase and equalsIgnoreCase

We can use both compareToIgnoreCase and equalsIgnoreCase to compare two strings in Java. Both methods take one string as a parameter, compare it with the caller string and return the result.

Read
java

How to read elements of a Java Vector using iterable

The Vector class in Java implements a growable array of objects. Unlike arrays, the vectors can grow or shrink as required. Accessing an element in a vector is same as like arrays. We can use the index position to access it.

Read
java

How to clone or copy a Vector in Java

In this tutorial, we will learn how to clone or copy a vector object in Java. The program will take user inputs to create one vector and then it will clone the vector to a different variable.

Read
java

How to write json data to a file in Java

JSON or javascript object notation is a simple form to represent complex data. Using JSON, we can easily transfer data to a different platform. For example, we can create one JSON object on our web application and share it with an Android or iOS application. As JSON rules are standard, all applications can share any information easily.

Read