Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-18-2010, 07:19 PM   #1
LQ Newbie
Registered: Aug 2010
Posts: 1

Rep: Reputation: 0
Question 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
Old 08-18-2010, 08:13 PM   #2
LQ Guru
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 7,521

Rep: Reputation: 2874Reputation: 2874Reputation: 2874Reputation: 2874Reputation: 2874Reputation: 2874Reputation: 2874Reputation: 2874Reputation: 2874Reputation: 2874Reputation: 2874
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.

Last edited by dugan; 08-18-2010 at 08:18 PM.
Old 08-18-2010, 09:17 PM   #3
John VV
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,170

Rep: Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494
this sounds like homework

but , by chance it is not .
give the REAL real world problem you are having
Old 08-18-2010, 09:18 PM   #4
Registered: Mar 2010
Location: Tokyo
Distribution: Arch, Fedora
Posts: 71

Rep: Reputation: 23
Originally Posted by swedenkhan View Post
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();



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PLZ, PLZ help - need some info kevmif Linux - General 9 12-17-2007 06:12 AM
plz plz help me regarding route mapping nedian123 Programming 1 07-13-2004 08:17 AM
plz plz solve my route mapping problem nedian123 Linux - Networking 1 07-12-2004 09:41 PM
plz, help me (plz realy ) h4ng4m3 Linux - General 10 08-18-2003 06:07 AM
redhat problems plz plz help sap666 Linux - Newbie 5 07-30-2003 10:57 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration