enum Status { Published(1), Rejected(2); // Line 2 int index; // Line 3 Status(int i) { index = i; } int getIndex(){return index;} // Line 5 } public class Tester { public static void main(String [] args) { System.out.println(Status.Published.index + Status.Rejected.index); // Line 10 } }
Published(1), Rejected(2); // Line 2
int index; // Line 3
Status(int i) { index = i; }
int getIndex(){return index;} // Line 5
}
public class Tester {
public static void main(String [] args) {
System.out.println(Status.Published.index + Status.Rejected.index); // Line 10
Oracle Certified Professional Java Programmer
Access: Public Instant Grading
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use.