public class EnumTest {
public static enum DATABASE_TYPE {Oracle, PostgreSQL, MSSQL, MySQL}
public static void main(String[] args) {
DATABASE_TYPE dt = null;
System.out.println(dt);
dt = DATABASE_TYPE.Oracle;
System.out.println(dt);
dt = DATABASE_TYPE.MSSQL;
System.out.println(dt);
dt = DATABASE_TYPE.PostgreSQL;
System.out.println(dt);
DATABASE_TYPE dbType = DATABASE_TYPE.Oracle;
if (dbType.equals(DATABASE_TYPE.Oracle))
System.out.println("ORACLE !!!");
else
System.out.println("ORACLE 아님 !!!");
}
}
댓글 없음:
댓글 쓰기