Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

Java enum Strings

enum Size {
   SMALL, MEDIUM, LARGE, EXTRALARGE
}

class Main {
   public static void main(String[] args) {

      System.out.println("string value of SMALL is " + Size.SMALL.toString());
      System.out.println("string value of MEDIUM is " + Size.MEDIUM.name());

   }
}
Comment

PREVIOUS NEXT
Code Example
Java :: horizontalAlignment center jlabel 
Java :: how to find odd and even in a array 
Java :: java background color 
Java :: final keyword in java 
Java :: seek bar 
Java :: webview dark mode android 
Java :: Java code to launch shell script with arguments 
Java :: java do while loop 
Java :: mongodb spring boot index usage 0 
Java :: Valid regex check java 
Java :: swapping two numbers using third variable 
Java :: java assert 
Java :: sending a excel in an attachment in email java 
Java :: hash map java 
Java :: java arraylist initialize with 0 
Java :: multithreading in java 
Java :: declaration in java 
Java :: for() in java 
Java :: room insert and return id 
Java :: multiple inheritance in java 
Java :: implement queue using array in java 
Java :: GridLayout 
Java :: java add values to array 
Java :: why we use return method 
Java :: android studio tabbed activity 
Java :: join strings in java 
Java :: android java how to stop users fromgoing back too much 
Java :: java exception handling 
Java :: android java how to show progressdialog in fragment 
Java :: access db in fragments 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =