Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java enum to string

public enum MyEnum{
	SOMETHING,SOMETHING_ELSE
}
MyEnum enumObject=MyEnum.SOMETHING;
System.out.println(enumObject.toString());
System.out.println(enumObject.name());
Comment

enum to string java

yourEnum.name()
Comment

Java Enum toString()

SMALL.toString()
// returns "SMALL"
Comment

enum to string java

    String name = Modes.mode1.name(); // Returns the name of this enum constant, exactly as declared in its enum declaration.
Comment

PREVIOUS NEXT
Code Example
Java :: Eclipse find/replace pluggin 
Java :: list all android sensors in java 
Java :: how to send images to storage using Admin Sdk in java 
Java :: Java remove element in a array - set to null 
Java :: stop countdown timer when exiting an activity 
Java :: AndroidManifest.xml file describes the fundamental characteristics of the app and defines each of its components 
Java :: how to shorten if else if and else in java 
Java :: Java Creating ConcurrentHashMap from Other Maps 
Java :: records java final 
Java :: how to fetch email and get there body content in spring boot 
Java :: java set get all not containing 
Java :: How To Export Records From JTable To MS Excel 
Java :: class java 
Java :: java random.nextint 
Java :: Java Overloading by changing the number of parameters 
Java :: how to code the overdraft limit in Java 
Java :: ezra margolin 
Java :: Draw an item using System.out.println 
Java :: Change or Replace ArrayList Elements using set() function 
Java :: fibonancci using dynamic programming in java 
Java :: java 8 validate based on pair of strings 
Java :: how to refresh activity intent in android 
Java :: android java random fragment on create 
Java :: java isalphanum 
Java :: MinimumAndMaximum 
Java :: correct lcd initialize 
Java :: choose image java 
Java :: final variables in java 
Java :: java polymorphism nedir 
Java :: extend vs implement in java 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =