Yahoo Answers is shutting down on 4 May 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How to convert String array to char array?

How to convert a String array to a double char array.

String []str into char [][]str

Update:

How to convert a String array to a double char array in java.

String []str into char [][]str

4 Answers

Relevance
  • 1 decade ago
    Favourite answer

    write this in your code :

    char [][]target;

    target = new char[str.length][];

    for(int i=0;i<str.length;i++)

    target[i] = str[i].toCharArray();

    this code will turn your string[] named str to char[][] named target

  • Anonymous
    4 years ago

    String To Char Array Java

  • ?
    Lv 4
    5 years ago

    Java String To Char Array

  • 5 years ago

    Use the c_str() approach of the string type to get on the underlying C string: string timmy = "abc"; char *johnny; johnny = timmy.c_str(); Or, in case you fairly do ought to repeat the completed string: string timmy = "abc"; char johnny[4]; strcpy(johnny, timmy.c_str());

Still have questions? Get answers by asking now.