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 :: méthode retourne nom classe java 
Java :: java map remove all null values 
Java :: can the method local inner class object access method local variables 
Java :: put in spring rest api 
Java :: java swing on close 
Java :: double if statement java 
Java :: Palindrome Program in Java. 
Java :: localbroadcastmanager android example 
Java :: how to disable coming back to activity android studio 
Java :: merge without extra space 
Java :: Spigot how to get block player is looking at 
Java :: determine if a number is factorial in Java 
Java :: java string strip 
Java :: getstring java 
Java :: list of java 
Java :: observer design pattern 
Java :: java parameterized constructor 
Java :: how to remove last latter in word in java 
Java :: binary to string java 
Java :: Java Change ArrayList Elements 
Java :: how to use java 
Java :: array to array list java 
Java :: map.put in java 
Java :: what is return method 
Java :: Java short Keyword 
Java :: string comparison using == in java 
Java :: java crypto ke random 
Java :: colors java intell print 
Java :: from which android version onwards cardelevation supports? 
Java :: how to repeat string in java 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =