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. package com; public class StringToArray { public static void main(String…s){ String str = “I Love Java”; char charArray[]; //converting …

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