Help coderanch get a
new server
by contributing to the fundraiser

Jagadeesh Kumar Macherla

Greenhorn
+ Follow
since Jan 12, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Jagadeesh Kumar Macherla

There are many ways to do it..First u have to retrieve all the rows from the database and store them in Vector.. if u r displaying the data in a jsp u can store that vector in a session and u can also have current index which u can incrememnt by 10 whenever u go to next page..
19 years ago
s.. its an anonymous array.. i am not sure if u can not initialize an array with String[] s = new String[]{"a",..}.. it could be possible..plz check it by writing a small program..
19 years ago
I hope u unserstood the first line.. it would return a random number from 0 - 4.
In the second line => new String[] { "a","b","c","d","e" }, is nothing but a string array it is equivalent to declaring an array and assinging it.
String[] arrayStrings = new String[] { "a","b","c","d","e" };
String name = arrayStrings[x];//this would assing the element corresponding to the random index..
19 years ago