Back to project page Crystal-Ball.
The source code is released under:
MIT License
If you think the Android project Crystal-Ball listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package me.rdokollari.crystalball; /*from ww w. ja v a2s . c om*/ import java.util.Random; public class CrystalBall { private String mAnswers[] = { "It is certain", "It is decidely so", "All signs say YES", "The stars are not aligned", "My replay is no", "It is doubtful", "Better not tell you now", "Concetrate and ask again", "Unable to answer now" }; /** * * @return a random generator answer. */ public String getRandomAnswer() { // Randomly select one of the three answers: Yes, No, or Maybe Random randomGenerator = new Random(); // construct a new random generator return mAnswers[randomGenerator.nextInt(mAnswers.length)]; } }