1. public class Outer{ 2. public void someOuterMethod() { 3. // Line 3 4. } 5. public class Inner{} 6. public static void main( String[]argv ) { 7. Outer o = new Outer(); 8. // Line 8 9. } 10. }
Show comments for this question (0) Add comments Link to this question
11. int x = 1, y =6; 12. while (y--) { 13. x++; 14. } 15. System.out.println(“x =” + x + “y =” +y);
Show comments for this question (1) Add comments Link to this question
12. float f[][][] = new float[3][][]; 13. float f0 = 1.0f; 14. float[][] farray = new float[1][1];
11. for (int i =0; i < 4; i +=2) { 12. System.out.print(i + “”); 13. } 14. System.out.println(i);
12. void start() { 13. A a = new A(); 14. B b = new B(); 15. a.s(b); 16. b = null; 17. a = null; 18. System.out.println(“start completed”); 19. }
1. public class Exception Test { 2. class TestException extends Exception {} 3. public void runTest() throws TestException {} 4. public void test() /* Point X */ { 5. runTest(); 6. } 7. }
11. int i = 0; 12. while (true) { 13. if(i==4) { 14. break; 15. } 16. ++i; 17. } 18. System.out.println(“i=”+i);
11. try { 12. int x = 0; 13. int y = 5 / x; 14. } catch (Exception e) { 15. System.out.println(“Exception”); 16. } catch (ArithmeticException ae) { 17. System.out.println(“Arithmetic Exception”); 18. } 19. System.out.println(“finished”);
1. public class Test { }