i have one simple question for me to finish. and i dont know how? can someone here helps me/ Just accept a string into a text field,and sort the characters in the string and display the sorted string in another textfield. thanks.............
-
Rob Ross
Bartender
Joined: Jan 07, 2002
Posts: 2205
posted
0
This question is too serious for MD. But since I just woke up... I'll let you figure out the text field part, but once you have the String, you can call toCharAway() to get the character sequence as a char array, then call Arrays.sort() to sort the array, then you can pass the sorted array to a new String constructor and get a sorted string.
Rob
SCJP 1.4
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18670
posted
0
toCharAway()? Does that transform the String into a spice or something? See, now it's a proper MD topic.
"I'm not back." - Bill Harding, Twister
Matthew Phillips
Ranch Hand
Joined: Mar 09, 2001
Posts: 2676
posted
0
I thought toCharAway() sent a random character on vacation.
Matthew Phillips
Rob Ross
Bartender
Joined: Jan 07, 2002
Posts: 2205
posted
0
DOH. hey, I DID mention I had just gotten up, right?
swaroop shastri
Ranch Hand
Joined: Aug 15, 2001
Posts: 65
posted
0
Originally posted by Mitchell Kave: i have one simple question for me to finish. and i dont know how?
If it's "simple" why dont u solve it urself. stop posting your homework here. this is the other homework this same person had posted a while back! http://www.coderanch.com/t/37176/md/Big-Help-Board [ June 07, 2002: Message edited by: swaroop shastri ]
Thomas Paul
mister krabs
Ranch Hand
Joined: May 05, 2000
Posts: 13974
posted
0
It's OK to ask a question about the homework. Just don't expect people to do your homeowrk. And Java homework shouldn't be in Meaningless Drivel anyway.