String

2 Ways to Convert String to Character Array in Java

Here you will learn about different ways to convert string to character array in java. 1. Using String.toCharArray() Method We can easily convert string to character array using String.toCharArray() method. It can be done in following way.

  Output I   L o v e   J a v a    2. Writing Own Logic …

2 Ways to Convert String to Character Array in Java Read More »

How to Split String in Java with Example

Here you will learn how to split string in java. We can split string in Java using split() method of java.lang.String class. It takes a regular expression as an argument and returns an array of strings. Syntax:

  Split String in Java Example Below program will split the string by space.

  Output …

How to Split String in Java with Example Read More »