Results 1 to 20 of 25
- 11-07-2010, 07:05 PM #1
Member
- Join Date
- Oct 2010
- Posts
- 26
- Rep Power
- 0
-
By looking in the String API. There you'll find methods that will help you solve this problem.
Please let us know how this turns out. Luck!
- 11-07-2010, 07:09 PM #3
Member
- Join Date
- Oct 2010
- Posts
- 26
- Rep Power
- 0
ok i found it... at first i just ctrl f (reverse) and it didn't find anything... then i clicked integer and found it under there.. thanks
- 11-07-2010, 07:10 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
-
- 11-07-2010, 07:20 PM #6
Member
- Join Date
- Oct 2010
- Posts
- 26
- Rep Power
- 0
- 11-07-2010, 07:22 PM #7
Member
- Join Date
- Oct 2010
- Posts
- 26
- Rep Power
- 0
- 11-07-2010, 07:37 PM #8
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
-
I second JosAH's recommendation as your current code will probably fail with his tests.
I should have been more specific. Check out the String API, not the main page, and don't look for a reverse method, but rather methods that allow you to loop through your String in a for loop and get char at specific locations.
Luck!
- 11-07-2010, 08:06 PM #10
Member
- Join Date
- Oct 2010
- Posts
- 26
- Rep Power
- 0
Write a method reverse that accepts an int number and returns an int with the digits in reverse order. For example,
int revNum = reverse( 1234 ); // revNum has a value of 4321
is this better?
-
- 11-07-2010, 10:02 PM #12
We need a dentist here, a proctologist just doesn't cut it ;)
- 11-07-2010, 10:18 PM #13
Member
- Join Date
- Oct 2010
- Posts
- 26
- Rep Power
- 0
ok new question... how do you get the length of input from a scanner input that is only integers?
example:
user enters: 1234
how do i get the length of 1234?
- 11-07-2010, 10:22 PM #14
Senior Member
- Join Date
- May 2010
- Posts
- 436
- Rep Power
- 4
You still haven't answered the question several folks have been askin' you! Where's the friggin' dentist when you need him??
- 11-07-2010, 10:31 PM #15
Member
- Join Date
- Oct 2010
- Posts
- 26
- Rep Power
- 0
cause i dont' know what the fuck you guys want from me...
- 11-07-2010, 10:50 PM #16
Senior Member
- Join Date
- May 2010
- Posts
- 436
- Rep Power
- 4
Then maybe you should say so rather than ignoring the question. Most here assume that you have solved your problem using method from integer. They're simply asking you to test your current code with the numbers that JosAH provided and that you report here on the result of this test. Was that so f***in hard to figure out?
- 11-07-2010, 10:59 PM #17
Member
- Join Date
- Oct 2010
- Posts
- 26
- Rep Power
- 0
i didn't ignore the question... i said what i wanted numerous times....
get an integer
reverse the integer
- 11-07-2010, 10:59 PM #18
Member
- Join Date
- Oct 2010
- Posts
- 26
- Rep Power
- 0
435 would be 534
are we on the same page now?
- 11-07-2010, 11:00 PM #19
Member
- Join Date
- Oct 2010
- Posts
- 26
- Rep Power
- 0
4587 would be 7854
- 11-07-2010, 11:17 PM #20
Senior Member
- Join Date
- May 2010
- Posts
- 436
- Rep Power
- 4
Similar Threads
-
how to input unspecified number if ints with a scanner
By ftrengnr in forum New To JavaReplies: 2Last Post: 09-14-2010, 01:24 AM -
Changing Scanner input type
By mlad in forum New To JavaReplies: 13Last Post: 03-18-2010, 04:22 PM -
problem with Scanner in Getting users input
By kliane in forum New To JavaReplies: 8Last Post: 01-17-2010, 04:37 PM -
Taking args consisting of a scanner input
By Implode in forum New To JavaReplies: 1Last Post: 09-27-2009, 09:16 PM -
Scanner input problem
By slayer_azure in forum New To JavaReplies: 3Last Post: 05-26-2008, 10:49 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks