-   Programming (
-   -   help me plz (

swedenkhan 08-18-2010 07:19 PM

help me plz
i have problem in java.
how to convert string array to character.
string a[]={"ab","abc","abd","ag"};
what will be the character array ??????????
thanks for your time

dugan 08-18-2010 08:13 PM

First, please change your subject to something more appropriate. I suggest "converting Java string arrays to character arrays."

Second, two question:
  1. is this homework?
  2. what should the end result be?

I really don't have a clear picture of what you're trying to end up with. However, it looks like coming up with the solution yourself (hint: Java's API documentation describes the String class' toCharArray method) might be easier than explaining it more clearly. When you do have a solution, post it.

John VV 08-18-2010 09:17 PM

this sounds like homework

but , by chance it is not .
give the REAL real world problem you are having

vigilandy 08-18-2010 09:18 PM


Originally Posted by swedenkhan (Post 4070734)
string a[]={"ab","abc","abd","ag"};

This will create an array of strings where a[0] is the string "ab", a[1] is "abc", etc.

what you may be looking for is

char[] myArr = "abc".toCharArray();

All times are GMT -5. The time now is 01:58 AM.