tk.hongkailiu.test.app.enumeration.Mobile Maven / Gradle / Ivy
The newest version!
package tk.hongkailiu.test.app.enumeration;
/**
* http://www.tutorialspoint.com/java/lang/enum_valueof.htm
*
* http://stackoverflow.com/questions/2418729/whats-the-best-practice-to-look-up-java-enums
*
* @author Liu
*/
public enum Mobile {
Samsung(400), Nokia(250), Motorola(325);
int price;
Mobile(int p) {
price = p;
}
int showPrice() {
return price;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy