Results 1 to 3 of 3
Thread: getting a random result
- 07-18-2007, 09:44 PM #1
Member
- Join Date
- Jul 2007
- Posts
- 4
- Rep Power
- 0
- 07-18-2007, 10:42 PM #2
Lets assume that you put your string inside str array. You will implement random selection like this:
Check javadoc of Random class for details.Java Code:Random rand = new Random(); rand.nextInt(str.length);
- 07-19-2007, 03:54 PM #3
Member
- Join Date
- Jul 2007
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
random numbers without random class`
By carlos123 in forum New To JavaReplies: 4Last Post: 01-17-2008, 10:44 PM -
Iterating through result set in JSTL
By Java Tip in forum Java TipReplies: 0Last Post: 01-15-2008, 03:13 PM -
Iterating through result set in JSTL
By Java Tip in forum Java TipReplies: 0Last Post: 01-14-2008, 09:31 AM -
How do i tell it to print out the result to the screen???
By paul in forum New To JavaReplies: 1Last Post: 08-07-2007, 05:04 AM -
Blank result for jsp_servlet in Eclipse
By Unni in forum EclipseReplies: 2Last Post: 07-12-2007, 04:30 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks