String toUpperCase example

String toUpperCase method is used to converts all characters in a given string to upper case. String has 2 toUpperCase methods.

The first method takes a default Loc

Read More →

String toLowerCase example

String toLowerCase method is used to converts all characters in a given string to lower case. String has 2 toLowerCase methods.

The first method takes a default Loc

Read More →

String substring example

String substring method is used to get a part of String using the start and end index. String had 2 substring methods.

1. String substring(int beginIndex) returns

Read More →

String length example

String length method in java is used to get the length of a given string. String length method example

Output Please Note: Before p

Read More →

String equals and equalsIgnoreCase

String equals and equalsIgnoreCase are used for comparing 2 Strings in java.Both these methods works exactly similar except for equalsIgnoreCase compares String ignoring case consideration. example

Read More →

How to split String in java

String API provides 2 methods to split String in java.

Both these methods return a array of String that has been split. In this post we will see some examples using

Read More →

How to convert String to long

In Java we have multiple ways to convert String to long. We will see a few of those ways in this post. 1. Convert String to long using Long.parseLong()

If the Strin

Read More →

How to convert String to Date

In this post we will see how to convert String to date in java. For this we will use SimpleDateFormat API to convert string to date. We need to pass in the dateformat in which we want to convert St

Read More →

How to convert String to boolean

In Java we have multiple ways to convert String to boolean. We will see a few of those ways in this post. 1. Convert String to boolean using Boolean.parseBoolean() For Any value of string other tha

Read More →