Java (Page 17/19)

Java string trim() method

Let’s learn java string trim() method. Java string trim() method String trim() method removes leading and trailing whitespaces from a string. This whitespace or space…

Read More

Reverse a string in java

Let’s learn to reverse a string in java. Reverse a string in java Let’s learn following ways to reverse a string. As we know that…

Read More

Java remove character from string

Let’s learn java remove character from string. Java remove character from string In java, String class do not have remove() method. Meanwhile String class have replace()…

Read More

String length() method in java

Let’s learn string length() method in java. String length() method in java String length() method returns length of this string. The length of the sequence…

Read More

String concatenation in java

Let’s learn string concatenation in java. String concatenation in java String concatenation is nothing but combining two or more strings to form a new string….

Read More

Java compare two strings

Let’s learn java compare two strings. Java compare two strings In java, String is immutable. Meaning, once created String object can’t be changed, they are…

Read More

String toUpperCase() method in java

Let’s learn string toUpperCase() method in java. String toUpperCase() method in java String toUpperCase method have two variants. public String toUpperCase() public String toUpperCase(Locale locale)…

Read More

Sparse matrix and its representations in java

Let’s learn sparse matrix and its representations in java. What is sparse matrix and its representation? Sparse matrix is a two dimensional array also known…

Read More

How to sort a string array in java

Let’s learn how to sort a string array in java. How to sort a string array in java Basically String class do not have method…

Read More

Selection sort java

Let’s learn selection sort java. Selection sort java In selection sort algorithm smallest element in unsorted array is shifted to its correct position in an…

Read More