Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

Java Enums

public class Main {
  enum Level {
    LOW,
    MEDIUM,
    HIGH
  }

  public static void main(String[] args) {
    Level myVar = Level.MEDIUM; 
    System.out.println(myVar);
  }
}
Comment

Java enums

enum Size { 
   SMALL, MEDIUM, LARGE, EXTRALARGE 
}
Comment

Java Enum name()

name(SMALL)
// returns "SMALL"
Comment

PREVIOUS NEXT
Code Example
Java :: illegal expression 
Java :: kubernetes java client create namespace 
Java :: toSet 
Java :: java program finish event 
Java :: Double matrix 
Java :: java swing place objects vertically 
Java :: Example of "this" : to invoke current class method 
Java :: test date in java 
Java :: change activity main drawer items text color android 
Java :: doubly linked list java add an element to the end 
Java :: java runtime.getruntime().exec 
Java :: odd numbers in java 
Java :: varargs java 
Java :: java arrays method 
Java :: java abstract class 
Java :: java enum from int 
Java :: enum to string java 
Java :: types of classes in java 
Java :: number of matches regex java 
Java :: java transaction example 
Java :: local inner class in java 
Java :: what is getService() in java 
Sql :: sql server reseed single table 
Sql :: postgresql reset sequence 
Sql :: sql disable trigger 
Sql :: mysql how to reset primary key 
Sql :: create database if not exists 
Sql :: list tables sqlite 
Sql :: sql query to get column data type in sql 
Sql :: postgres regex remove special characters 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =