Yep I'm Back for Some Java Help :(

ChrisCramer247

Platinum Member
Dec 6, 2001
2,171
1
0
Just bought the Dietel and Dietel book today at the University Bookstore. Now how do I do this :(. I was reviewing the sample data that my Prof gave me, compiled and AGAIN her source doesn't compile. Here is the assignment online Assignment 4b. I've done part one, and three (not correct but its done), But how do I output the user entry in reverse order. I have no idea what function to use. You guys have tought me more here on the forums then I have learned in my dern class :).

Thanks!
-Chris :D
 

manly

Lifer
Jan 25, 2000
13,125
3,893
136
Chris,

Here's one way to do Part II. First off, bookmark http://java.sun.com/j2se/1.4/docs/api/index.html [java.sun.com]. The Java platform libraries Javadocs are *extremely* useful.

Every Java String type has an internal char [] buffer.

You'll get that buffer from the String, reverse the contents into a new char [] buffer. Then, construct a new String based on that buffer. Again, you'll need to confer w/ the String class Javadocs.

Simple as that.