Given a sample code:
1 class ListState {
2 public enum State{DELHI, MUMBAI, MADRAS}
}
3 public class Sample4 {
4 public static void main(String args[]) {
5 // Place the statement here
}}
What statement you place at line number 5 for successful compilation and execution of above code?
(1) ListState state = ListState.DELHI;
(2) ListState.State state = ListState.State.MADRAS;
(3) ListState state = MUMBAI;
(4) ListState state = ListState.MUMBAI;
(2)
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.