Java - How to convert string to charArray ?

String str="Welcome To"
How can convert the above string to charArray without using any buit-in function in java?
Anyone to know the answer.please help me? i am new to learn java.

Questions by KALIDOSS T

Showing Answers 1 - 3 of 3 Answers


  • Aug 27th, 2013

It is possible to convert the string to array by using ToCharArray() method.


  1. String s1="java is great";

  2. char c[]=s1.ToCharArray();


Sandhya Rani

  • Sep 3rd, 2013

  1.                   String s ="sandhya";

  2.                   char[] charArray= new char[s.length()];


  4.                   for(int i=0;i<s.length();i++){

  5.                           charArray[i]=s.charAt(i);

  6.                   }


  Was this answer useful?  Yes

digvijay kumar

  • Jun 27th, 2015

dhakkan you used the Java inbuilt function

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions