Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Quiz_Fragen {
- int zufall;
- String fragen[] = new String[19];// Arrey von Fragen
- static String frage;
- public Quiz_Fragen(){
- fragen[1] = "Was hat bababa?$Me$Jura$li$nichts$Jura";
- fragen[2] = "Was hat bababa?$Me$Jura$li$nichts$Jura";
- fragen[3] = "Was hat ccc?$ccc$ddd$eee$fff$eee";
- fragen[4] = "Was hat aaa?$aaa$sss$sss$fff$sss";
- fragen[5] = "Was hat hpbbit?$Me$Jura$li$nichts$Jura";
- frage = fragen[zufall(1,6)]; //ändern wenn mehr fragen
- }
- public int zufall (int min, int max){
- zufall = (int)((max-min)*Math.random()+min); //Mathematischer logarithmus
- return zufall;
- }
- } // end of class Quiz_Fragen
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement