Declarations and Access Control Logic
© examsiri.com
Question : 24 of 29
Marks:
+1,
-0
Given:
Which two code fragments, inserted independently at line 9, allow theFabric class to compile?
1. public class Fabric
2. public enum Color {
3.   RED(0xff0000), GREEN(0x00ff00), BLUE(0x0000ff);
4.   private final int rgb;
5.   Color( int rgb) { this.rgb = rgb; }
6.   public int getRGB() { return rgb; }
7. };
8. public static void main( String[] argv) {
9.   /*insert code here*/
10. }
11. }Which two code fragments, inserted independently at line 9, allow theFabric class to compile?
Go to Question: