This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Servlets and the fly likes AND THE WINNERS ARE!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "AND THE WINNERS ARE!!!" Watch "AND THE WINNERS ARE!!!" New topic


Matt Midcap

Joined: Jan 07, 1999
Posts: 440
And the winners are....
<h1>Paul Wetzel</h1>
<h1>Kavita Ghia</h1>
<h3>Let's here it for our winners! Wooo Hoooooo!!!</h3>

Here is how the winners were chosen: I went through the forum and read EVERY message posted on or after the 18th. If the author had a proper name and the message had some substance (not just "thanks" or "enter me in the contest" or "yeah, what he said") then I added the name to a list in a text file.
I ended up with 122 lines in the text file. Some names were repeated several times.
I used this little program to pick a number from 1 to 122:

import java.util.* ;
public class Pick
public static void main( String[] args )
int numPicks = Integer.parseInt( args[0] );
Random r = new Random();
for( int i = 0 ; i < 10 ; i++ )
System.out.println( r.nextInt( numPicks ) + 1 );

Fair enough?
Thanks to the good folks at Wrox press ( for the books!
Questions? Comments? Should we do this again? I think we should how about you?
Best Regards,
Matt Midcap

Best Regards,<br />Matt Midcap
paul wheaton

Joined: Dec 14, 1998
Posts: 20861

Congratulations Paul and Kavita!

permaculture Wood Burning Stoves 2.0 - 4-DVD set
Tony Alicea

Joined: Jan 30, 2000
Posts: 3222
¡Felicidades Paul and Kavita!

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Great work! Matt Did a really good job.
maha anna
paul wheaton

Joined: Dec 14, 1998
Posts: 20861

Way to go Matt! You even go more participation than when I did a book giveaway!
Paul Wetzel
Ranch Hand

Joined: Nov 02, 1999
Posts: 107
Thanks! I feel very lucky to have won! Also I owe alot to javaranch. This place has been a most valued resource in my professional success.
keep up the good work
Paul J. Wetzel
[This message has been edited by Paul Wetzel (edited October 23, 2000).]
Kavita Ghia
Ranch Hand

Joined: Oct 10, 2000
Posts: 91
Hello Friends,
Its great to have a place like JavaRanch.I am calling it a place because it serves the purpose of the like minded people
very well.This is the message to say thanks to all the folks at
JavaRanch and especially to Matt for having such innovative ideas
and maintaining the interest of their members.Great going Matt!
My special thanks also goes to Paul and Tony for wishing me.And I
am thankful to all the people at JavaRanch for being very co-operative,courteous and helpful.
Ranch Hand

Joined: Oct 13, 2000
Posts: 66
Congratulations Kavita and Paul
and Matt....this is really a fab way to pick winners
looking forward to the next contest
Pichai Bala

Joined: Oct 17, 2000
Posts: 16
First of all congrats to Kavita and Paul.
When I tried to print the values of r.nextInt()in the code given by Matt it gives some values which are very large values that doesn't fit into int. Basically I don't understand the concept of using the random object over the Math.random(). How is the random class better than the Math.random()
Please help me in understanding.

It is sorta covered in the JavaRanch Style Guide.
jQuery in Action, 3rd edition