Show comments for this question (0) Add comments Link to this question
1. class EnclosingOne { 2. public class InsideOne {} 3. } 4. public class InnerTest{ 5. public static void main(String[]args) { 6. EnclosingOne eo = new EnclosingOne(): 7. //insert code here 8. } 9. }
1. class Base Class { 2. private float x = 1.0f; 3. protected void set Var(float f) { x = f;} 4. } 5. class SubClass extends BaseClass{ 6. private float x = 2.0f 7. //insert code here 8. }
1. Class A { 2. public int getNumber(int a) { 3. return a + l: 4. } 5. } 6. 7. class B extends A { 8. public int getNumber(int a) { 9. return a + 2: 10. } 11. 12. public static void main (String args[] { 13. A a = new B(); 14. Systemout.printIn(a.getNumber(0)); 15. } 16. }
1. public class Foo { 2. public static void main (String [] args) { 3. int i = l: 4. int j = i++; 5. if ((i = = ++j) | (i++==j)) { 6. i + = j; 7. } 8. } 9. }
1. public class Test { 2. public static void main (String args[]) { 3. int i + 0 x FFFFFFF1: 4. int j = i; 5. 6. } 7. }