RandomGreeting

From ggc

Jump to: navigation, search

01 import java.util.*;
02 /**
03  * All about my application here.
04  @author Jam Jenkins
05  */
06 public class RandomGreeting
07 {
08   public static void main(String[] args)
09   {
10     Random random=new Random();
11     int x=random.nextInt(10)+1;
12     System.out.println("The number is "+x);
13     /*
14     if(Math.random()>0.95)
15       System.out.println("World Hello!");
16     else
17       System.out.println("Hello World!");*/
18   }
19 }


Download/View RandomGreeting.java





Views
Personal tools
Add to 
del.icio.usAdd to 
diggAdd to 
FacebookAdd to 
favoritesAdd to 
GoogleAdd to 
MySpaceAdd to 
PrintAdd to 
SlashdotAdd to 
StumbleUponAdd to 
Twitter