Phrase-O-Matic Program it's Fun To Program it


package Matic;

/**
 *
 * @author Fahim-Ismail
 * nice Game To Play with your Friend
 */
public class PhraseOMatic {
   
    public static void main(String []args){
    //here we have to create a list of things to start playing the game on right way
    String[] List1={"Red","Blue","Green"};
    String[] List2={"Car","Flower","Laptop"};
    String [] List3={"Iphone","Avaya","Nokia"};
    //next we have to calculate how word on each list
   
    int LengthListOne =List1.length;
    int LenghtListTwo =List2.length;
    int LenghtListThree=List3.length;
   
    //now Create A three Random Numbers
   
    int rand1=(int)(Math.random()*LengthListOne);
    int rand2=(int)(Math.random()*LenghtListTwo);
    int rand3=(int)(Math.random()*LenghtListThree);
   
    //now we need to built a phrase
   
    String Phrase=List1[rand1]+" "+List2[rand2]+" "+List3[rand3];
    //now we need to print the Phrase
   
    System.out.println("We Need To Print The New Phrase\t"+Phrase);
   
    }
   
}


try it....

Comments

Popular posts from this blog

PSYCHEDELIC/SPACE ROCK

طيار من سلاح الجو الملكي يثير الفخر و الاعجاب على مواقع التواصل الاجتماعي

how to Crack My Eclipse 10.6 with Easy Way