The time now is 09/18/08 - 19:47
Log in: Username: Password:
Search forums for:
  

Java Problem...

Post new topic   Reply to topic
Author Message
Devook
RealPoor Guru
RealPoor Guru


Joined: 31 Mar 2004
Posts: 2373
Location: Ypsilanti or Troy, MI



PostPosted: 03/21/05 - 13:12    Post subject: Java Problem... Reply with quote

"Using a while statement, write a Java code fragment that prints the characters stored in a String object called str backward."

Go!
Back to top
Xion
RealPoor Guru
RealPoor Guru


Joined: 11 Oct 2002
Posts: 2117
Location: Los Angeles, CA



PostPosted: 03/21/05 - 13:17    Post subject: Reply with quote

This is an incredibly easy program to write.

i would learn to do it yourself, as if you don't you're going to bomb whatever class you're in when it comes test time.
Back to top
Devook
RealPoor Guru
RealPoor Guru


Joined: 31 Mar 2004
Posts: 2373
Location: Ypsilanti or Troy, MI



PostPosted: 03/21/05 - 13:21    Post subject: Reply with quote

I'm taking the test right now. I have 45 minutes to figure out this one problem because I finished with the rest of the test in about 5 minutes. I just wanted to see if anyone figured it out before I did.

Also, it's funny that the java class definition of a string is the first thing to come up on Google over websites about strings irl.

P.S.
Code:

System.out.print("?");
String str = scan.next();
int x = str.length() - 1;

while(x >= 0) {
System.out.print(str.charAt(x));
x--; }
Back to top
Xion
RealPoor Guru
RealPoor Guru


Joined: 11 Oct 2002
Posts: 2117
Location: Los Angeles, CA



PostPosted: 03/21/05 - 13:34    Post subject: Reply with quote

edit: my bad, that was C++
Back to top
Callaren
RealPoor Sensei
RealPoor Sensei


Joined: 03 Dec 2003
Posts: 1598
Location: South Jersey



PostPosted: 03/21/05 - 16:31    Post subject: Reply with quote

JAVA APPLICATIONS SUCK ASS!

TRY{jizz_on_face;}
CATCH{jizz_in_eye;}

God I f*****g hated try catch shit.
Back to top
Display posts from previous:   
Post new topic   Reply to topic
Page 1 of 1

Related topics:
Technical problems with Lineage 2
Iksar Monk 756 AA Druzzil CD-Key (No problem moving him TM)
PC gamepad problems with Final Fantasy XI
Guild Wars Account problem
Problem with new Nvidia drivers
woohoo! the answer to my smoke problems!
TL problem
Anarchy Online Loading Problems
Problem at the AMC!
Man sues Atkins over heart problems he blames on diet
Problem viewing Neopets images
Starcraft problems
Cocaine - The Solution to Americans Obesity Problem
Avatar Problems
Problem with a post
Weird problem in Win XP
i have a problem
Tattoo problems...
problem i'm having with burning cds
rotf some people have problems