Back to project page GADemo.
The source code is released under:
GNU General Public License
If you think the Android project GADemo 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 com.pdro.gademo; //from w ww.jav a 2s . c o m import java.util.Random; public class FactBook { // Member variable (properties about the object) public String[] mFacts = { "Google Analytics is the most popular Web Analytics tool in the world.", "Google Analytics doesn?t share personally identifiable information.", "There are currently 220 Google Analytics Certified Partners around the world.", "Google Analytics is fluent in 40 languages.", "Google Analytics was originally based on Urchin on Demand." }; // Method (abilities: things the object can do) public String getFact() { String fact = ""; // Randomly select a fact Random randomGenerator = new Random(); // Construct a new Random number generator int randomNumber = randomGenerator.nextInt(mFacts.length); fact = mFacts[randomNumber]; return fact; } }