Pages

Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Saturday, 18 October 2014

How to convert string to Character in Java without using built in functions


Below method: with Built in

   String str="Google";
   char[] arr=str.toCharArray(); // What is the wrong with this way

Below method: without Built in method.
  String str="Google";
   char[] arr=new char[str.length()];
   for (int i=0;i<str.length();i++){
       arr[i]=str.charAt(i);
   }

No comments:

Post a Comment