You are on page 1of 55

LARA_TECHNOLOGIES 2013

1. Program System.out.println(true);
System.out.println('a');
class A }
}
{
5. Program
class C
public static void main(String args[])
{
{ public static void main(String[] args)
{
System.out.println("done"); System.out.println(100 + 20);
System.out.println(100 - 20);
} System.out.println(100 * 20);
System.out.println(100 / 20);
}

2. Program
System.out.println(100 ==
class Hello 2000);
System.out.println(20 != 40);
{ }
}
public static void main(String[] args) 6. Program
class D
{
{
System.out.println("Hello World!"); public static void main(String[] args)
{
} int i = 10;
System.out.println(i);
} }
}
3. Program 7. Program
class A class E
{ {
public static void main(String[] args) public static void main(String[] args)
{ {
System.out.println("Hello int i = 10;
World!"); System.out.println(i);
System.out.println("Hello i = 20;
World!"); System.out.println(i);
System.out.println("Hello }
World!"); }
} 8. Program
} class F
4. Program {
class B public static void main(String[] args)
{ {
public static void main(String[] args) int i;
{ i = 10;
System.out.println("Hello System.out.println(i);
World!"); }
System.out.println(1000); }
System.out.println(10.900);

www.laratechnology.com Page 1
LARA_TECHNOLOGIES 2013
class K
9. Program {
class G public static void main(String[] args)
{ {
public static void main(String[] args) int i, j, m;
{ double n;
int i = 20; i = j = m = 10;
int j = i; n = 30.90;
System.out.println(i); System.out.println(i);
System.out.println(j); System.out.println(j);
} System.out.println(m);
} System.out.println(n);
}
}
10. Program 14. Program
class H
{ class L
public static void main(String[] args)
{
{
int i, j, k = 10, m;
public static void main(String[] args)
i = 20;
j = i + 30; {
m = j + k + 20;
System.out.println(i); int i, j;
System.out.println(j);
System.out.println(k); double m, n = 10.9, p;
System.out.println(m);
i = 40;
}
} j = 50;
11. Program
class I m = 1.2;
{
public static void main(String[] args) p = 3.6;
{
int x = 10; System.out.println(i);
int x = 20;
System.out.println(j);
System.out.println(x);
} System.out.println(m);
}
12. Program System.out.println(p);
class J
{ }
public static void main(String[] args)
{ }
int x = 10;
15. Program
x = 20;
class M
System.out.println(x);
{
}
public static void main(String[] args)
}
{
13. Program
System.out.println(i);

www.laratechnology.com Page 2
LARA_TECHNOLOGIES 2013
int i = 10; System.out.println(i); //8
} System.out.println(j); //9
} System.out.println(k); //10
}
16. Program }
class N 21. Program
{ class S
public static void main(String[] args) {
{ public static void main(String[] args)
Int i; {
System.out.println(i); int i;
} i ++;
} System.out.println("done");
17. Program }
class O }
{ 22. Program
public static void main(String[] args) class A
{ {
int i; public static void main(String[] args)
System.out.println("done"); {
} Int i = 0;
} System.out.println(i++);
18. Program System.out.println(i);
class P }
{ }
public static void main(String[] args) 23. Program
{
Int i; class B
System.out.println(i = 10);
{
}
}
public static void main(String[] args)
19. Program
class Q {
{
public static void main(String[] args) Int i = 0;
{
int i; //5 System.out.println(i--);
int j = i; //6
System.out.println(i);
System.out.println(i); //7
System.out.println(j); //8 }
}
} }
20. Program
class R 24. Program
{ class C
public static void main(String[] args) {
{ public static void main(String[] args)
int i; //5 {
int j = 10; //6 int i = 0;
int k = i + j; //7 int j = i++;

www.laratechnology.com Page 3
LARA_TECHNOLOGIES 2013
System.out.println(i); Int i = 0;
System.out.println(j); Int j = i++ + i++ + i++ + i;
} System.out.println(i);
} System.out.println(j);
25. Program }
class D }
{ }
public static void main(String[] args)
{ 29. Program
int i = 0;
int j = i --; class H
System.out.println(i);
{
System.out.println(j);
}
public static void main(String[] args)
}
26. Program {
class E
{ Int i = 0;
public static void main(String[] args)
{ Int j = i-- + i + i-- + i;
int i = 0;
System.out.println(i);
int j = i++ + i;
System.out.println(i); System.out.println(j);
System.out.println(j);
} }
}
27. Program }

class F 30. Program

{ class I

public static void main(String[] args) {

{ public static void main(String[] args)

int i = 0; {

int j = i++ + i + i++ + i; int x = 0;

System.out.println(i); int y = x-- + x-- + x-- + x;

System.out.println(j); System.out.println(x);

} System.out.println(y);

} }

28. Program }
class G
{ 31. Program
public static void main(String[] args) class J
{ {

www.laratechnology.com Page 4
LARA_TECHNOLOGIES 2013
public static void main(String[] args) {
{ public static void main(String[] args)
Int x = 0; {
int y = x++ + x + x-- + x; Int i = 0;
System.out.println(x); int j = ++i;
System.out.println(y); System.out.println(i);
} System.out.println(j);
} }
32. Program }
class K
{ 37. Program
public static void main(String[] args) class P
{ {
Int i = 0; public static void main(String[] args)
int j = i++ + i-- + i++ + i--; {
System.out.println(i); Int i = 0;
System.out.println(j); int j = --i;
} System.out.println(i);
} System.out.println(j);
33. Program }
class L }
{ 38. Program
public static void main(String[] args)
{ class Q
Int i = 0;
{
int j = i++ + i + i-- + i;
System.out.println(i);
public static void main(String[] args)
System.out.println(j);
} {
}
34. Program Int i = 0;
class M
{ Int j = ++ i + i;
public static void main(String[] args)
System.out.println(i);
{
int i = 0; System.out.println(j);
System.out.println(++i);
} }
}
35. Program }
class N
{ 39. Program
public static void main(String[] args)
{
class R
Int i = 0;
System.out.println(--i); {
}
} public static void main(String[] args)
36. Program
class O {

www.laratechnology.com Page 5
LARA_TECHNOLOGIES 2013
int i = 0; 42. Program
class U
int j = --i + i + --i + i; {
public static void main(String[] args)
System.out.println(i);
{
Int i = 0;
System.out.println(j);
Int j = i++ + i +
} i-- + i +
--i + i +
} ++i + i;
System.out.println(i);
40. Program System.out.println(j);
}
class S
}
{
43. Program
public static void main(String[] args)
class V
{
{
int i = 0;
public static void main(String[] args)
int j = --i + --i + --i + i;
{
System.out.println(i);
int i = 0;
System.out.println(j);
i = i++;
}
System.out.println(i);
}
}
41. Program
}
class T
44. Program
{ class W
{
public static void main(String[] args) public static void main(String[] args)
{
{ Int i = 0;
i = i--;
Int i = 0;
System.out.println(i);
int j = ++i + i + --i + i; }
}
System.out.println(i); 45. Program
class X
System.out.println(j); {
public static void main(String[] args)
} {
Int i = 0;
}
i = ++i;

www.laratechnology.com Page 6
LARA_TECHNOLOGIES 2013
System.out.println(i); public static void main(String[] args)
}
} {
46. Program
System.out.println("from main");
class Y
{
}
public static void main(String[] args)
{ }
int i = 0;
i = --i; 49. Program
System.out.println(i); class C
{
} public static void test1()
} {
System.out.println("from
47. Program test1");
class A }
{ public static void main(String[] args)
public static void main(String[] args) {
{ System.out.println("from
System.out.println("Hello main");
World!"); }
System.out.println("Hello public static void test2()
World!"); {
System.out.println("Hello System.out.println("from
World!"); test2");
System.out.println("Hello }
World!"); }
} 50. Program

public static void test() Class D


{
{
System.out.println("from
test"); static void test()
}
} {
48. Program
System.out.println("test");
Class B
}
{
public static void main(String[] args)
public static void test()
{
{
System.out.println("main begin");
System.out.println("from test");
test();
}
System.out.println("main end");

www.laratechnology.com Page 7
LARA_TECHNOLOGIES 2013
} {
System.out.println("test1");
51. Program }
class E static void test2()
{ {
public static void test1() System.out.println("test2
{ begin");
System.out.println("from test1();
test1"); System.out.println("test2
} end");
public static void main(String[] args) }
{
System.out.println("main public static void main(String[] args)
begin"); {
test1(); System.out.println("main
test2(); begin");
System.out.println("main test1();
end"); test2();
} System.out.println("main
static void test2() end");
{ }
System.out.println("from }
test2");
} 54. Program
} class H
{
52. Program public static void test()
class F {
{ System.out.println("from
public static void test1() test");
{ }
System.out.println("from
test1"); public static void main(String[] args)
} {
public static void main(String[] args) System.out.println("from
{ main");
System.out.println("main test();
begin"); }
test1(); }
System.out.println("------"); 55. Program
test1(); class I
System.out.println("------"); {
System.out.println("main public static void main(String[] args)
end"); {
} System.out.println("Hello
} World!");
53. Program test();
class G }
{ }
static void test1() 56. Program

www.laratechnology.com Page 8
LARA_TECHNOLOGIES 2013
class J }
{
public static void main(String[] args) }
{
59. Program
System.out.println("Hello
class M
World!");
{
}
static void test()
}
{
57. Program
System.out.println("test
class K
begin");
{
if(true)
static void test()
{
{
System.out.println("from
System.out.println("from if");
test");
return;
System.out.println("from
}
test");
System.out.println("test
}
end");
public static void main(String[] args)
}
{
public static void main(String[] args)
test();
{
System.out.println("------");
System.out.println("main
test();
begin");
test();
test();
}
System.out.println("main
}
end");
58. Program
}
class L }

{ 60. Program
class N
static void test() {
static void test()
{
{
System.out.println("test
System.out.println("from test begin");
begin");
System.out.println("from test end"); return;
System.out.println("test
return; end");
}
} public static void main(String[] args)
{
public static void main(String[] args)
test();
{ System.out.println("Hello
World!");
test(); }
}
System.out.println("----"); 61. Program
class O
test(); {

www.laratechnology.com Page 9
LARA_TECHNOLOGIES 2013
public static void main(String[] args) }
{ public static void main(String[] args)
System.out.println("main {
begin"); System.out.println("from
System.out.println("main main");
end"); test();
return; }
} }
} 65. Program
class S
62. Program {
class P static int test()
{ {
public static void main(String[] args) System.out.println("from
{ test");
System.out.println("main return 20;
begin"); }
if(100 == 100) public static void main(String[] args)
{ {
System.out.println("from
System.out.println("from if"); main begin");
return; Int i = test();
} System.out.println(i);
System.out.println("main System.out.println("from
end"); main end");
} }
} }
66. Program
63. Program class T
class Q {
{ static int test()
public static void main(String[] args) {
{ System.out.println("from
if(true) test");
{ return 10;
return; }
public static void main(String[] args)
System.out.println("Hello World!"); {
} int i = test();
System.out.println("from int j = 10 + test();
end"); System.out.println(test());
} System.out.println(i);
} System.out.println(j);
64. Program System.out.println(i + j +
class R test());
{ }
static int test() }
{ 67. Program
System.out.println("from class U
test"); {

www.laratechnology.com Page 10
LARA_TECHNOLOGIES 2013
static int test() System.out.println("from test");
{
System.out.println("from }
test");
public static void main(String[] args)
return 20;
}
{
public static void main(String[] args)
{ int i = 10 + test();
System.out.println("main
begin"); System.out.println(i);
test();
System.out.println("main }
end");
}
}
} 70. Program
68. Program class X
{
class V
static int test()
{ {
int i = 10;
return i;
}
static void test() public static void main(String[] args)
{
{
test();
System.out.println(test());
System.out.println("from test");
System.out.println(test() +
test());
} }
}
71. Program
class Y
public static void main(String[] args) {
static int test1()
{
{
System.out.println("from
System.out.println(test());
test1");
} return 100;
}
}
static int test2()
69. Program {
System.out.println("from
class W
test2");
{ return test1();
}
static void test()
public static void main(String[] args)
{ {
test1();

www.laratechnology.com Page 11
LARA_TECHNOLOGIES 2013
System.out.println(test2()); test();
System.out.println(test2() + System.out.println("from
test1()); main end");
test2(); }
} }
} 74. Program
72. Program class B
class Z {
{
static int test1() static void test(int i)
{ {
System.out.println("from System.out.println("from
test1"); test");
return 10; System.out.println(i);
} }
static int test2()
{ public static void main(String[] args)
System.out.println("from {
test2"); System.out.println("main
return test1(); begin");
} test(10);
System.out.println("-------");
static int test3() int k = 100;
{ test(k);
System.out.println("from System.out.println("main
test3"); end");
return test1() + test2(); }
} }

public static void main(String[] args) 75. Program


{ class C
System.out.println(test1()); {
System.out.println(test2()); static void test(int i)
System.out.println(test3()); {
} System.out.println("from
} test:" + i);
}
73. Program public static void main(String[] args)
class A {
{ test(100);
static void test(int i) int k = 200;
{ test(k);
System.out.println("from test(k + 300);
test"); int m;
System.out.println(i); test(m);
} System.out.println("done");
public static void main(String[] args) }
{ }
System.out.println("from 76. Program
main begin"); class D

www.laratechnology.com Page 12
LARA_TECHNOLOGIES 2013
{ System.out.println("main
static void test(int i) end:" + i);
{ }
System.out.println("from }
test:" + i); 79. Program
} class G
public static void main(String[] args) {
{ static void test(int i)
int m; {
test(m = 10); System.out.println("test:" +
System.out.println("done"); i++);
} }
} public static void main(String[] args)
{
77. Program int i = 10;
class E test(i);
{ System.out.println("main:" +
static void test(int i, int j) i);
{ }
System.out.println("i = " + i + }
", j = " + j);
} 80. Program
class H
{
public static void main(String[] args)
{ static void test(int i)
test(10, 20); {
int i = 200; System.out.println("test:" +
test(i, 500); i++);
test(2000, i); System.out.println("test:" +
test(i, i); i);
System.out.println("done"); }
}
}
78. Program public static void main(String[] args)
class F {
{ Int i = 10;
static void test(int i) test(i);
{ System.out.println("main:" +
System.out.println("test:" + i);
i); }
i = 10; }
} 81. Program
public static void main(String[] args) class I
{ {
Int i = 20; static void test(boolean flag, int x)
System.out.println("main {
begin:" + i); System.out.println("from
test(i); test");
System.out.println(flag);

www.laratechnology.com Page 13
LARA_TECHNOLOGIES 2013
System.out.println(x);
}
public static void main(String[] args)
{
public static void main(String[] args)
System.out.println("from
main");
{
test(true, 20);
System.out.println("------"); System.out.println(test());
boolean f1 = false;
test(f1, 30); }
}
} }
82. Program
84. Program
class J
class L
{
{
static int test()
static void test(double d1, char c1)
{
{
Int i = 0;
System.out.println("from
return i++;
test");
}
System.out.println(d1);
System.out.println(c1);
}
public static void main(String[] args)
{
int i = 0;
public static void main(String[] args)
System.out.println(test());
{
System.out.println(i);
System.out.println("from
}
main");
}
test(90.9090, 'a');
85. Program
double v1 = 89.0909;
class M
char v2 = 's';
{
test(v1, v2);
static int test(int i)
}
{
}
return i++;
83. Program
}
class K
public static void main(String[] args)
{ {
int i = 0;
System.out.println(test(i));
System.out.println(i);
static int test()
}
}
{
86. Program
Int i = 0; class N
{
return i++; static int test(int i)
{
} return i--;

www.laratechnology.com Page 14
LARA_TECHNOLOGIES 2013
} {
public static void main(String[] args)
{ return i++;
Int i = 0;
}
System.out.println(i);
System.out.println(test(i));
public static void main(String[] args)
System.out.println(i);
i = test(i); {
System.out.println(i);
} int i = 0;
}
System.out.println(test(i++));
87. Program
System.out.println(i);
class O
{ }
static int test(int i)
{ }
return ++i;
} 90. Program
public static void main(String[] args) class R
{ {
int i = 0; static int test(int i)
System.out.println(test(i)); {
System.out.println(i); return i--;
} }
} public static void main(String[] args)
88. Program {
class P Int i = 0;
{ System.out.println(test(i++));
static int test(int i) System.out.println(i);
{ i = 0;
return --i; System.out.println(test(i--));
} System.out.println(i);
}
}
public static void main(String[] args) 91. Program
{ class S
System.out.println(test(9)); {
int i = 0; static int test(int i)
System.out.println(test(i)); {
System.out.println(i); return ++i;
} }
}
89. Program public static void main(String[] args)
{
class Q int i = 0;
System.out.println(test(i++));
{ System.out.println(i);
i = 0;
static int test(int i)
System.out.println(test(i--));

www.laratechnology.com Page 15
LARA_TECHNOLOGIES 2013
System.out.println(i); {
} static int test(int i)
} {
92. Program return i++;
class T }
{
static int test(int i) public static void main(String[] args)
{ {
return i++; int i = 0;
} int j = test(i++) + i;
System.out.println(i);
public static void main(String[] args) System.out.println(j);
{ }
Int i = 0; }
System.out.println(i); 95. Program
i = test(i++); class W
System.out.println(i); {
} static int test(int i)
} {
return ++i;
}
93. Program

class U public static void main(String[] args)


{
{
int i = 0;
int j = test(i++) + i +
static int test(int i)
test(++i);
{ System.out.println(i);
System.out.println(j);
return i--; }
}
} 96. Program

public static void main(String[] args) class X

{ {

int i = 0; static int test(int i)

System.out.println(i); {

i = test(i--); return i++;

System.out.println(i); }

} public static void main(String[] args)

} {

94. Program int i = 0;


class V

www.laratechnology.com Page 16
LARA_TECHNOLOGIES 2013
int j = i++ + i + test(i++) + return i++;
}
++i + test(i++) + i
+ static int test2(int i)
{
--i + test(i--) + i +
return test1(++i);
}
i + test(i--) + ++i;

System.out.println(i); static int test3(int i)


{
System.out.println(j); return test1(i++);
}

public static void main(String[] args)


}
{
} int i = 0;
int j = test1(i++) + i;
97. Program System.out.println(i);
class Y System.out.println(j);
{ i = j = 0;
static int test1(int i) j = test1(++i) + i;
{ System.out.println(i);
return i++; System.out.println(j);
} i = j = 0;
j = test2(++i) + i;
static int test2(int i) System.out.println(i);
{ System.out.println(j);
return ++i;
} i = j = 0;
j = test3(++i) + i;
public static void main(String[] args) System.out.println(i);
{ System.out.println(j);
Int i = 0;
Int j = i++ + i + test1(i++) + i = j = 0;
i + j = test3(++i) + i +
++i + i + test1(i++) + i +
test1(++i) + i + test2(i++) + i +
++i + i + test2(++i) + i;
test2(++i) + i + System.out.println(i);
i++ + i + System.out.println(j);
test2(i++) + i;
System.out.println(i); }
System.out.println(j); }
} 99. Program
}
98. Program class Z1
class Z
{
{
static int test1(int i) static int test(int i)
{

www.laratechnology.com Page 17
LARA_TECHNOLOGIES 2013
{ test2(++i) + i;

return i++; System.out.println(i);

} }

public static void main(String[] args) }

{ 101. Program
class Z3
Int i = 0; {
static int test1(int i)
i = i++ + i + test(i++) + i;
{
return test2(i++) +
System.out.println(i);
test2(++i);
} }

} static int test2(int i)


} {
100. Program return test3(i--) + test3(--i);
}
class Z2
static int test3(int i)
{
{
static int test1(int i) return i++ + ++i + i;
}
{ public static void main(String[] args)
{
return ++i; Int i;
i = test1(i = 0);
} System.out.println(i);
i = test2(i = 0);
System.out.println(i);
static int test2(int i) i = test1(i++);
System.out.println(i);
{ i = test2(++i);
System.out.println(i);
return test1(++i) + test1(i++); }
}
}
102. Program

class A
public static void main(String[] args)
{
{
static int i;
Int i = 0;

i = test1(i++) + i +
public static void main(String[] args)
test2(i++) + i +

www.laratechnology.com Page 18
LARA_TECHNOLOGIES 2013
{ public static void main(String[] args)
{
System.out.println(i); System.out.println(i);
System.out.println(j);
}
System.out.println(k);
}
}
}
103. Program 107. Program
class B class F
{ {
static int i; static int i, j = 10, k, m = 20;
static double j; public static void main(String[] args)
static boolean k; {
public static void main(String[] args) System.out.println(i);
{ System.out.println(j);
System.out.println(i); System.out.println(k);
System.out.println(j); System.out.println(m);
System.out.println(k); }
} }
}
104. Program 108. Program
class C class G
{ {
static int i; static int i;
static int j = 10; static double j, m = 30.9, k;
public static void main(String[] args) public static void main(String[] args)
{ {
System.out.println(i); System.out.println(i);
System.out.println(j); System.out.println(j);
} System.out.println(m);
} System.out.println(k);
105. Program }
class D }
{ 109. Program
static int i; class H
static int j; {
public static void main(String[] args) static int i;
{
System.out.println(i); static void test()
System.out.println(j); {
i = 10; System.out.println("from
j = 20; test:" + i);
System.out.println(i); }
System.out.println(j);
}
} public static void main(String[] args)
106. Program {
class E System.out.println("main:" +
{ i);
static int i, j, k; i = 10;

www.laratechnology.com Page 19
LARA_TECHNOLOGIES 2013
test(); System.out.println("test2:" + x);
}
} x = 2;
110. Program
}
class I
{

static int x; public static void main(String[] args)

static void test() {


{
System.out.println("test:" + test1();
x);
System.out.println("main1:" + x);
x = 10;
} test2();

public static void main(String[] args) System.out.println("main2:" + x);


{
System.out.println("main1:" }
+ x);
x = 20; }
test();
112.Program
System.out.println("main2:"
+ x); class K
} {
} static int i;
public static void main(String[] args)
111. Program {
System.out.println("a:" + i);
class J
int i = 10;
{ System.out.println("b:" + i);
i = 20;
static int x = 0; System.out.println("c:" + i);
}
}

static void test1() }

{
113.Program
System.out.println("test1:" + x);
class L
x = 1;
{
} public static void main(String[] args)
{
int i = 0;
double i = 0.4;
static void test2() System.out.println("done");
}
{
}

www.laratechnology.com Page 20
LARA_TECHNOLOGIES 2013
114. Program public static void main(String[] args)

class M {
{
static int i = 10; System.out.println(i);
static boolean i = true;
i = 10;
public static void main(String[] args)
{
System.out.println(P.i);
System.out.println("done");
} }
}
}
115. Program
class N 118. Program
{ class Q
static int i = 10; {
public static void main(String[] args) static int i = 10;
{
int i = 20; public static void main(String[] args)
System.out.println(i); {
System.out.println(N.i); System.out.println(i);
} double i = 2.9;
} System.out.println(i);
System.out.println(Q.i);
116. Program }
}
class O
119. Program
{
class R
static int i;
{
public static void main(String[] args)
static int i = 10;
{

System.out.println(O.i);
static int j = i;
O.i = 10;

System.out.println(O.i);
public static void main(String[] args)
}
{
}
System.out.println(i);
117. Program
System.out.println(j);
class P
}
{
}
static int i;

www.laratechnology.com Page 21
LARA_TECHNOLOGIES 2013
120. Program }
class S
{ 123. Program
static int i; class V
{
static int j = i;
static int i = 10;
public static void main(String[] args)
{ static int j = i;
System.out.println(i);
System.out.println(j); static int m = n;
}
} static int n = j;

public static void main(String[] args)


121. Program {
class T System.out.println(i);
{ System.out.println(j);
static int i = 10; System.out.println(m);
static int j = 20; System.out.println(n);
static int k = i + j; }
public static void main(String[] args) }
{ }
System.out.println(i); 124. Program
System.out.println(j);
class W
System.out.println(k);
}
{
}
static int i = 10;

122. Program

class U static int j = test();

static int i = j; static int test()

static int j = 10; return 20;

public static void main(String[] args) public static void main(String[] args)

{ {

System.out.println(i); System.out.println(i);

System.out.println(j); System.out.println(j);

} }

www.laratechnology.com Page 22
LARA_TECHNOLOGIES 2013
} static int j = 10;

125. Program static int test()


class X {
{ return j;
}
static int test1()
{ public static void main(String[] args)
return 1; {
} System.out.println(i);
System.out.println(j);
static int i = test1() + test2(); }
}
static int test2()
{ 128. Program
return 2; class Z1
} {
static int i = test();
public static void main(String[] args)
{
System.out.println(i); static int test()
} {
} System.out.println("from
} test");
return 10;
126. Program }
class Y
{ public static void main(String[] args)
{
static int i = 10; System.out.println("main
begin");
static int j = test(); System.out.println(i);
System.out.println("main
static int test() end");
{ }
return i; }
}

public static void main(String[] args) 129. Program


{ class Z2
System.out.println(i); {
System.out.println(j); }
}
} 130. Program
127. Program class Z3
class Z {
{ static int i = test();

static int i = test(); static int test()


{

www.laratechnology.com Page 23
LARA_TECHNOLOGIES 2013
System.out.println("from static
test"); {
return 10; System.out.println("SIB");
} }
}

131. Program public static void main(String[] args)


class Z4 {
{ System.out.println("main");
}
static int i = test1(); }

static int test1()


{ 134. Program
System.out.println("from class B
test1"); {
return 10; public static void main(String[] args)
} {
System.out.println("from
public static void main(String[] args) main");
{ }
System.out.println(i);
System.out.println(test1()); static
} {
} System.out.println("from
SIB");
132. Program }
class Z5 }
{
static int i = test();
135. Program
static int test() class C
{ {
System.out.println("from static
test1"); {
main(null); System.out.println("SIB1");
return 10; }
} public static void main(String[] args)
{
public static void main(String[] args) System.out.println("main");
{ }
System.out.println("from static
main"); {
System.out.println(i); System.out.println("SIB2");
} }
}
------------------------------------------------------- }
133. Program
class A
{ 136. Program

www.laratechnology.com Page 24
LARA_TECHNOLOGIES 2013
class D public static void main(String[] args)

{ static int i; {

Static System.out.println(i);

{ }

i = 10; }

} 139. Program
class G
public static void main(String[] args) {
static
{
{
System.out.println(i);
System.out.println(i);
}
}
static int i;
}
public static void main(String[] args)
137. Program {
class E System.out.println("done");
{ }
static int i = 1; }
140. Program
static class H
{ {
i = 2; static int i;
}
static
{
public static void main(String[] args) i = j;
{ }
System.out.println(i);
} static int j = 10;
}
public static void main(String[] args)
138. Program {
System.out.println("done");
class F
}
{ }

static 141. Program


class I
{ {
static int i = test();
i = 1;
static
}
{
static int i = 2; System.out.println("SIB1");

www.laratechnology.com Page 25
LARA_TECHNOLOGIES 2013
} public static void main(String[] args)
{
static int test() System.out.println("main " +
{ i);
System.out.println("test"); }
return 10; }
} 143. Program
class A
public static void main(String[] args) {
{ static int i;
System.out.println("done"); }
System.out.println(i); class B
} {
public static void main(String[] args)
static {
{ System.out.println(A.i);
System.out.println("SIB2"); }
} }

} 144. Program
enum B
{
}

class C
}
{
}
142. Program
class J
interface D
{
{
static int i = test();
}

static
145. Program
{
class F
System.out.println("sib
{
begin");
static int i;
main(null);
public static void main(String[] args)
System.out.println("sib
{
end");
System.out.println("from
}
main:" + i);
System.out.println("from
static int test()
main:" + F.i);
{
}
System.out.println("test
}
begin");
class G
main(null);
{
System.out.println("test
public static void main(String[] args)
end");
{
return 20;
System.out.println("from
}
main:" + F.i);

www.laratechnology.com Page 26
LARA_TECHNOLOGIES 2013
} {
} static
146. Program {
class H System.out.println("K-SIB1");
{ }

static public static void main(String args[])


{ {
System.out.println("H-SIB"); System.out.println("K-
} main");
}
public static void main(String[] args)
{ static
System.out.println("H- {
main"); System.out.println("K-SIB2");
} }
}
} }
class I
{ 148. Program
static class L
{ {
System.out.println("I-SIB");
} static
{
public static void main(String[] args) System.out.println("SIB-L");
{ }
System.out.println("I-main");
} public static void main(String[] args)
} {
System.out.println("L-main");
147. Program }
class J }
{
static class M
{ {
System.out.println("J-SIB1");
} static
{
public static void main(String[] args) System.out.println("SIB-M");
{ }
System.out.println("J-main");
} public static void main(String[] args)
{
static System.out.println("M-main-
{ begin");
System.out.println("J-SIB2"); L.main(args);
} System.out.println("M-main-
} end");
class K }

www.laratechnology.com Page 27
LARA_TECHNOLOGIES 2013
} {
149. Program System.out.println("P-SIB");
}
class N static void test1()
{
{
System.out.println("from
test1");
static int i = 10;
}
static }

{ class Q
{
System.out.println("N-SIB"); public static void main(String[] args)
{
}
System.out.println("-----");
} P.test1();
P.test1();
class O P.test1();
System.out.println("-----");
{ }

static static
{
{
System.out.println("Q-SIB");
{ }

System.out.println("O-SIB"); }
151. Program
} class R
{
public static void main(String args[]) static int i = 10;
}
{

System.out.println("O-main-b"); 152. Program


class S
System.out.println(N.i); {
static void test()
System.out.println(N.i); {
System.out.println("from
System.out.println(N.i);
test");
}
System.out.println("O-main-e");
}
} 153. Program
class T
} {
public static void main(String[] args)
{
150. Program System.out.println(R.i);
class P S.test();
{ }
static

www.laratechnology.com Page 28
LARA_TECHNOLOGIES 2013
} {
public static void main(String[] args)
154. Program {
class U System.out.println("from
{ main:" + C.i);
static C.test();
{ }
System.out.println("U-SIB"); }
} 157. Program
class A
public static void main(String[] args) {
{ int i;
System.out.println("U-
main"); public static void main(String[] args)
} {
} System.out.println(i);
}
155. Program }
class V
{ 158. Program
static class B
{ {
System.out.println("V-SIB");
} void test()
{
public static void main(String[] args) }
{
System.out.println("V-main- public static void main(String[] args)
begin"); {
U.main(args); test();
System.out.println("-----"); System.out.println("Hello
U.main(null); World!");
System.out.println("V-main- }
end"); }
}
} 159. Program
class C
{
156. Program
class C int i;
{
static int i; static void test()
{
static void test() System.out.println(i);
{ }
System.out.println("from }
test:" + i); 160. Program
} class D
} {
class D void test1()

www.laratechnology.com Page 29
LARA_TECHNOLOGIES 2013
{ {
System.out.println("from
test1"); void test()
} {
static void test2() }
{
test1(); public static void main(String[] args)
System.out.println("from {
test2"); H h1 = new H();
} h1.test();
} System.out.println("Hello
161. Program World!");
class E }
{ }
int i;
165. Program
static class I
{ {
System.out.println(i);
} int x;
}
static void test()
{
162. Program I rv = new I();
class F System.out.println(rv.x);
{ }
void test1() }
{
}
166. Program
static class J
{ {
test1(); void test1()
} {
} System.out.println("from
test1");
}
163. Program
class G static void test2()
{ {
int i; J obj = new J();
obj.test1();
public static void main(String[] args) System.out.println("from
{ test2");
G g1 = new G(); }
System.out.println(g1.i); }
}
} 167. Program
164. Program class K
class H {

www.laratechnology.com Page 30
LARA_TECHNOLOGIES 2013
int i; n1.i = 10;
n2.i = 20;
static
{ System.out.println(n1.i);
K k1 = new K(); System.out.println(n2.i);
System.out.println(k1.i);
}
}
168. Program }
class L }
{ 171. Program
void test1() class O
{ {
System.out.println("from int i;
test1");
} public static void main(String[] args)
{
static O o1 = new O();
{ O o2 = o1;
L obj = new L();
obj.test1(); o1.i = 10;
} System.out.println(o2.i);
}
o2.i = 20;
System.out.println(o1.i);
169. Program }
class M }
{ 172. Program
int i; class P
{
public static void main(String[] args) int i;
{
M m1 = new M(); static void test(P obj)
System.out.println(m1.i); {
m1.i = 10; System.out.println("test:" +
System.out.println(m1.i); obj.i);
} }
}
170. Program public static void main(String[] args)
class N {
{ P p1 = new P();
int i; System.out.println("main:" +
p1.i);
public static void main(String[] args) p1.i = 10;
{ test(p1);
N n1 = new N(); }
System.out.println(n1.i); }
N n2 = new N(); 173. Program
System.out.println(n2.i);
class Q

www.laratechnology.com Page 31
LARA_TECHNOLOGIES 2013
{ 175. Program
class S
int i; {
int i;

static void test1(int x)


public static void main(String[] args)
{
{ x = 10;
}
Q q1 = new Q();
static void test2(S s1)
q1.i = 10; {
s1.i = 20;
}
Q q2 = q1;
public static void main(String[] args)
System.out.println(q2.i); {
S s1 = new S();
s1.i = 30;
System.out.println("A:" +
q2.i = 20; s1.i);
test1(s1.i);
Q q3 = q2;
System.out.println("B:" +
System.out.println(q3.i); s1.i);
test2(s1);
System.out.println(q1.i); System.out.println("C:" +
s1.i);
} }
}
} 176. Program
class T
174. }Program
{
class R
int i;
{
int i;
static T test()
{
static void test(R obj)
T t1 = new T();
{
return t1;
obj.i = 20;
}
}
public static void main(String[] args)
public static void main(String[] args)
{
{
R r1 = new R();
T obj = test();
r1.i = 10;
System.out.println(obj.i);
System.out.println("A:" +
}
r1.i);
}
test(r1);
177. Program
System.out.println("B:" +
class U
r1.i);
{
}
int i;
}

www.laratechnology.com Page 32
LARA_TECHNOLOGIES 2013
W rv = test(obj);
static U test()
{ System.out.println(rv.i);
U u1 = new U(); }
u1.i = 20; }
return u1; 180. Program
} class X
{
public static void main(String[] args) int i;
{
U obj = test(); static void test(X obj1, X obj2)
System.out.println(obj.i); {
} int i = obj1.i;
} obj1.i = obj2.i;
obj2.i = i;
}

178. Program public static void main(String[] args)


class V {
{ X x1 = new X(), x2 = new X();
int i; // int i = 9, j = 20;
x1.i = 10;
static V test() x2.i = 20;
{ test(x1, x2);
return new V(); System.out.println(x1.i);
} System.out.println(x2.i);
}
public static void main(String[] args) }
{ 181. Program
V v1 = test();
System.out.println(v1.i); class A
}
{
}
179. Program
A()
class W
{ {
int i;
System.out.println("A()");
static W test(W w1)
{ }
W w2 = new W();
w2.i = w1.i;
return w2; public static void main(String[] args)
}
{
public static void main(String[] args)
{ A a1 = new A();
W obj = new W();
obj.i = 20; System.out.println("done");

www.laratechnology.com Page 33
LARA_TECHNOLOGIES 2013
} public static void main(String[] args)
{
182. Program D d1 = new D();
class B System.out.println("----");
{ System.out.println(d1.i);
B() System.out.println(d1.j);
{ }
System.out.println("B()"); }
} 185. Program
class E
public static void main(String[] args) {
{ int i;
B b1 = new B();
System.out.println("-----"); E(int k)
B b2 = new B(); {
System.out.println("-----"); i = k;
} System.out.println("K()");
} }
183. Program
class C public static void main(String[] args)
{ {
E e1 = new E(9);
int i; System.out.println("------");
E e2 = new E(90);
C() System.out.println("------");
{ E e3 = new E(910);
System.out.println("C()"); System.out.println("------");
i = 10; System.out.println(e1.i);
} System.out.println(e2.i);
System.out.println(e3.i);
public static void main(String[] args) }
{ }
C c1 = new C();
System.out.println("----"); 186. Program
System.out.println(c1.i); class F
} {
int i;

} F(int k)
184. Program {
class D i = 10;
{ System.out.println("F()");
int i; }
int j = 20;
D() public static void main(String[] args)
{ {
System.out.println("D()"); F f1 = new F();
i = 10; System.out.println(f1.i);
} }
}

www.laratechnology.com Page 34
LARA_TECHNOLOGIES 2013
{
187. Program J j1 = new J();
class G System.out.println("----");
{ J j2 = new J(20);
G() System.out.println("----");
{ J j3 = new J();
System.out.println("G()"); System.out.println("----");
} J j4 = new J(50);
System.out.println("----");
public static void main(String[] args) }
{ }
G g1 = new G(90); 191. Program
System.out.println("done");
} class K
}
{
188. Program
class H
{
public static void main(String[] args) K(int i)
{
H h1 = new H(); {
System.out.println("done");
} System.out.println("K(int)");
} }
}
}

189. Program
class I K(boolean b)
{
public static void main(String[] args) {
{
I obj = new I(90); System.out.println("K(boolean)");
System.out.println("done");
}
}
}
190. Program public static void main(String[] args)
class J {
{ K k1 = new K(90);
J() System.out.println("-----");
{ K k2 = new K(true);
System.out.println("J()"); System.out.println("-----");
} }
}
J(int i) 192. }Program
{ class L
System.out.println("J(int)"); {
}
L(int i, int j)
{
public static void main(String[] args)

www.laratechnology.com Page 35
LARA_TECHNOLOGIES 2013
System.out.println("L(int, }
int)");
} public static void main(String[] args)
{
L(int i, double j) N n1 = new N();
{ System.out.println("-----");
System.out.println("L(int, N n2 = new N(10);
double)"); System.out.println("-----");
} }
}
public static void main(String[] args) 195. Program
{ class O
L obj1 = new L(10, 20); {
System.out.println("----");
L obj2 = new L(10, 2.0); O()
System.out.println("----"); {
} this(10);
} System.out.println("O()");
193. Program }
class M
{ O(int i)
M(int i) {
{ System.out.println("O(int)");
System.out.println("M(int)"); }
}
public static void main(String[] args)
{
public static void main(String[] args) O o1 = new O();
{ System.out.println("-----");
M m1 = new M(10); O o2 = new O(20);
System.out.println("----"); System.out.println("-----");
M m2 = new M(); }
System.out.println("----"); }
} 196. Program
}
class P

{
194. Program
class N
P()
{
{
N()
{ this(10, 20);
System.out.println("N()");
} System.out.println("P()");

}
N(int i)
{
this();
System.out.println("N(int)"); P(int i, int j)

www.laratechnology.com Page 36
LARA_TECHNOLOGIES 2013
{
198. Program
System.out.println("P(int, int)"); class R
{
}
R()
{
System.out.println("R()");
public static void main(String[] args) }

{ R(int i)
{
P p1 = new P(); System.out.println("R(int)");
this();
System.out.println("-------");
}
P p2 = new P(1, 2); public static void main(String[] args)
{
System.out.println("-------"); R r1 = new R();
System.out.println("------");
}} R r2 = new R(20);
System.out.println("------");
197. Program }
class Q }
{
Q() 199. Program
{ class S
this(10); {
System.out.println("Q()");
} S()
{
Q(int i) System.out.println("S()");
{ }
this(1, 20);
System.out.println("Q(int)"); S(int i)
} {
S();
System.out.println("S(int)");
Q(int i, int j) }
{
System.out.println("Q(int, public static void main(String[] args)
int)"); {
} S obj1 = new S();
public static void main(String[] args) System.out.println("------");
{ S obj2 = new S(10);
Q q1 = new Q(); System.out.println("------");
System.out.println("-----"); }
Q q2 = new Q(10, 20); }
System.out.println("-----");
Q q3 = new Q(30); 200. Program
System.out.println("-----"); class T
} {
}

www.laratechnology.com Page 37
LARA_TECHNOLOGIES 2013
T() this();
{ System.out.println("V()");
System.out.println("T()"); }
} }
203. Program
T(int i) class W
{ {
T t1 = new T(); static
System.out.println("T(int)"); {
} System.out.println("SIB");
}

public static void main(String[] args) W()


{ {
T obj1 = new T(); System.out.println("W()");
System.out.println("-----"); }
T obj2 = new T(10);
System.out.println("-----");
} public static void main(String[] args)
} {
W w1 = new W();
201. Program System.out.println("--------");
class U W w2 = new W();
{ System.out.println("--------");
U() }
{ }
this(10); 204. Program
System.out.println("U()"); class X
} {

U(int i) static
{ {
this(); System.out.println("SIB1");
System.out.println("U(int)"); }
}
static
public static void main(String[] args) {
{ System.out.println("SIB2");
U u1 = new U(); }
System.out.println("-----");
U u2 = new U(10); X()
System.out.println("-----"); {
} System.out.println("X()");
} }

202. Program X(int i)


class V {
{ this();
V() System.out.println("X(int)");
{ }

www.laratechnology.com Page 38
LARA_TECHNOLOGIES 2013
public static void main(String[] args)
public static void main(String[] args) {
{ System.out.println("main
X x1 = new X(); begin");
System.out.println("----"); Z z1 = new Z();
X x2 = new X(2); System.out.println("main
System.out.println("----"); end");
} }
} }
205. Program 207. Program
class Y class A
{ {

Y() A()
{ {
System.out.println("Y()"); System.out.println("A()");
} }

static A(int i)
{ {
Y y1 = new Y(); System.out.println("A(int)");
System.out.println("SIB"); }
}

public static void main(String[] args) public static void main(String[] args)
{ {
System.out.println("-----"); A a1 = new A();
Y y1 = new Y(); System.out.println("------");
System.out.println("-----"); A a2 = new A(10);
} System.out.println("------");
} }
}
206. Program 208. Program
class Z class B
{ {
B()
static {
{ System.out.println("B()");
System.out.println("SIB }
begin");
Z z1 = new Z(); {
System.out.println("SIB System.out.println("IIB");
end"); }
}

Z() public static void main(String[] args)


{ {
System.out.println("Z()"); B b1 = new B();
} System.out.println("------");
B b2 = new B();

www.laratechnology.com Page 39
LARA_TECHNOLOGIES 2013
System.out.println("------"); {
} D()
} {
209. Program System.out.println("D()");
}
class C
{
{
System.out.println("IIB1");
}

C() {
System.out.println("IIB2");
{ }

System.out.println("C()");
public static void main(String[] args)
}
{
D d1 = new D();
System.out.println("-----");
{ D d2 = new D();
System.out.println("-----");
System.out.println("IIB"); }
}
} 211. Program
class E
{
C(int i)
{
{ System.out.println("E-IIB1");
}
System.out.println("C(int)");
E(int i)
} {
System.out.println("E(int)");
}
public static void main(String[] args)
public static void main(String[] args)
{ {
E e1 = new E(90);
C c1 = new C(); System.out.println("-----");
E e2 = new E(30);
System.out.println("------");
System.out.println("-----");
}
C c2 = new C(20);

System.out.println("------"); {
System.out.println("E-IIB2");
} }
} }
210. Program
class D 212. Program

www.laratechnology.com Page 40
LARA_TECHNOLOGIES 2013
class F System.out.println("-----");
{ }
}
{
System.out.println("F-IIB1"); 214. Program
} class H
{
F(int i) H(int i)
{ {
this(); System.out.println("H(int)");
System.out.println("F(int)"); }
}
{
F() System.out.println("IIB1");
{ }
System.out.println("F()");
} H()
{
public static void main(String[] args) this(10);
{ System.out.println("H()");
F f1 = new F(); }
System.out.println("------");
F f2 = new F(50); {
System.out.println("------"); System.out.println("IIB2");
} }
}
213. Program public static void main(String[] args)
class G {
{ H h1 = new H();
System.out.println("------");
{ H h2 = new H(20);
System.out.println("IIB"); System.out.println("------");
} }
}
G() 215. Program
{ class I
this(90); {
System.out.println("G()"); I()
} {
System.out.println("I()");
G(int i) }
{
System.out.println("G(int)"); {
} System.out.println("IIB");
}
public static void main(String[] args)
{ static
G g1 = new G(); {
System.out.println("-----"); System.out.println("SIB");
G g2 = new G(20); }

www.laratechnology.com Page 41
LARA_TECHNOLOGIES 2013
J obj1 = new J();
public static void main(String[] args) System.out.println("----");
{ J obj2 = new J(20);
I obj1 = new I(); System.out.println("----");
System.out.println("----"); }
I obj2 = new I(); 217. }Program
System.out.println("----");
I obj3 = new I(); class K
System.out.println("----");
{
}
}
K()
216. Program
{
class J
System.out.println("K()");
{
}
J()

{
{
System.out.println("J()");
System.out.println("IIB1");
}
}

{
K(int i)
System.out.println("J-IIB");
{
}
this();

System.out.println("K(int)");
J(int i)
}
{
218.
this();
static
System.out.println("J(int)");
{
}
System.out.println("SIB1");
static
{ }
System.out.println("J-SIB");
}

K(int i, int j)
public static void main(String[] args)
{
{
this(j);

www.laratechnology.com Page 42
LARA_TECHNOLOGIES 2013
System.out.println("K(int, int)"); System.out.println(b1.j);
}
} }
220. Program

class C
static
{
{
int i;
System.out.println("SIB2");

}
void test1()

{
{
System.out.println("from test1");
System.out.println("IIB2");
}
}
}

class D extends C
public static void main(String[] args)
{
{
int j;
K k1 = new K();

System.out.println("-----");
void test2()
K k2 = new K(100);
{
System.out.println("-----");
System.out.println("from test2");
K k3 = new K(100, 200);
}
System.out.println("-----");

}}
public static void main(String[] args)
219. Program
class A {
{
int i; D d1 = new D();
}
class B extends A d1.test1();
{
d1.test2();
int j;
System.out.println("-----");
public static void main(String[] args)
{ d1.i = 10;
B b1 = new B(); d1.j = 20;
System.out.println(b1.i);

www.laratechnology.com Page 43
LARA_TECHNOLOGIES 2013
System.out.println(d1.i + "," f1.m = 50;
+ d1.j); f1.test1();
} f1.test3();
} System.out.println("-----");
221. Program System.out.println(E.j);
class E System.out.println(F.n);
{ System.out.println(e1.i);
int i; System.out.println(f1.i + "," +
static int j; f1.m);
}
void test1() }
{ 222. Program
System.out.println("from class I
test1"); {
} I()
static void test2() {
{ System.out.println("I()");
System.out.println("from }
test2"); }
}
} class J extends I
class F extends E {
{ J()
int m; {
static int n; System.out.println("J()");
void test3() }
{ }
System.out.println("from
test3"); class K
} {
static void test4() public static void main(String[] args)
{ {
System.out.println("from I obj1 = new I();
test4"); System.out.println("-----");
} J obj2 = new J();
} System.out.println("-----");
class G }
{ }
public static void main(String[] args) 223. Program
{
E.test2(); class L
F.test2();
{
F.test4();
E.j = 10;
L()
F.n = 20;
E e1 = new E(); {
e1.i = 30;
e1.test1(); System.out.println("L()");
F f1 = new F();
f1.i = 40; }

www.laratechnology.com Page 44
LARA_TECHNOLOGIES 2013
} }

class M extends L 224. Program

{ class P

M() {

{ P()

System.out.println("M()"); {

} System.out.println("P()");

} }

class N extends M

{ class Q extends P

N() {

{ Q()

System.out.println("N()"); {

} super();

} System.out.println("Q()");

class O }

public static void main(String[] args) class R

{ {

L obj1 = new L(); public static void main(String[] args)

System.out.println("-----"); {

M obj2 = new M(); Q q1 = new Q();

System.out.println("-----"); System.out.println("------");

N obj3 = new N(); P p1 = new P();

System.out.println("-----"); System.out.println("------");

www.laratechnology.com Page 45
LARA_TECHNOLOGIES 2013
} }

} }

225. Program class W extends V


class S
{ {
S()
W(int i)
{
System.out.println("S()");
{
}
} System.out.println("W(int)");

class R extends S }
{
R() public static void main(String[] args)
{
{
super();
System.out.println("R()"); V v1 = new V(90);
}
} System.out.println("------");

class T extends R W w1 = new W(90);


{
T() System.out.println("------");
{
}
System.out.println("T()");
} }
}
class U 227. Program
{ class X
public static void main(String[] args) {
{ }
T t1 = new T(); class Y extends X
System.out.println("-----"); {
R r1 = new R(); Y(int i)
System.out.println("-----"); {
S s1 = new S(); System.out.println("Y(int)");
System.out.println("-----"); }
} public static void main(String[] args)
} {
226. Program Y y1 = new Y(10);
System.out.println("------");
class V }
}
{

V(int i) 228. Program


class A
{ {
A(int i)
System.out.println("V(int)"); {

www.laratechnology.com Page 46
LARA_TECHNOLOGIES 2013
System.out.println("A(int)"); System.out.println("D()");
}
} }

public static void main(String[] args)


class B extends A
{
{
B()
{ C c1 = new C(10);
System.out.println("B()");
} System.out.println("-----");
public static void main(String[] args)
{ D d1 = new D(20);
A a1 = new A(90);
System.out.println("-----");
System.out.println("-----");
B b1 = new B(); D d2 = new D();
}
} System.out.println("-----");
229. Program
}
class C
}
{
230. Program
C(int i) class E
{
{ E()
{
System.out.println("C(int)");
System.out.println("E()");
} }
E(int i)
} {
System.out.println("E(int)");
}
}
class D extends C
class F extends E
{
{
F()
D(int i) {
System.out.println("F()");
{ }
F(int i)
super(i); {
System.out.println("F(int)");
System.out.println("D(int)");
}
public static void main(String[] args)
}
{
D() E e1 = new E();
System.out.println("----");
{ E e2 = new E(10);
System.out.println("----");
super(10); F f1 = new F();

www.laratechnology.com Page 47
LARA_TECHNOLOGIES 2013
System.out.println("----"); System.out.println("IIB");
F f2 = new F(90); }
}
} I(int x)
231. Program {
class G System.out.println("I(int)");
{ }
G(int i)
{ I(double d)
System.out.println("G(int)"); {
} this();
G()
{ System.out.println("I(double)");
System.out.println("G()"); }
}
} public static void main(String[] args)
class H extends G {
{ I i1 = new I();
H() System.out.println("-----");
{ I i2 = new I(20);
super(10); System.out.println("-----");
System.out.println("H()"); I i3 = new I(2.0);
} System.out.println("-----");
}
H(int i) }
{ 233. Program
super(); class J
System.out.println("H(int)"); {
} J()
{
public static void main(String[] args) System.out.println("J()");
{ }
H h1 = new H(); }
System.out.println("-----"); class K extends J
H h2 = new H(10); {
System.out.println("-----"); K()
G g1 = new G(90); {
System.out.println("-----"); System.out.println("K()");
G g2 = new G(); super();
} }
} public static void main(String[] args)
232. Program {
class I System.out.println("done");
{ }
I() }
{
System.out.println("I()"); 234. Program
}
class L
{
{

www.laratechnology.com Page 48
LARA_TECHNOLOGIES 2013
System.out.println("M(int,
int)");
L() }
}
{
class N extends M
{
super();
N()
System.out.println("L()"); {
super(10, 20);
this(10); System.out.println("N(int,
int)");
} }

{
L(int i) System.out.println("N-IIB");
}
{
N(int i)
super(); {
this();
System.out.println("L(int)"); System.out.println("N(int)");
}
}

N(double i)
{
public static void main(String[] args) super(10);

{ System.out.println("N(double)");
}
System.out.println("done");
public static void main(String[] args)
}
{
} M m1 = new M(10);
System.out.println("------");
235. Program M m2 = new M(20, 4);
class M System.out.println("------");
{ N n1 = new N();
M(int i) System.out.println("------");
{ N n2 = new N(10);
System.out.println("M(int)"); System.out.println("------");
} N n3 = new N(1.0);
System.out.println("------");
{ }
System.out.println("M-IIB"); }
} 236. Program
class O
M(int i, int j) {
{ O()
this(j); {
System.out.println("O()");

www.laratechnology.com Page 49
LARA_TECHNOLOGIES 2013
} class R extends Q

{ {
System.out.println("O-IIB");
R()
}
}
{
class P extends O
{ System.out.println("R()");
P(int i)
{ }
System.out.println("P(int)");
}

{
{
System.out.println("P-IIB"); System.out.println("R-IIB");
}
}
public static void main(String[] args)
{ }
O o1 = new O();
System.out.println("------");
P p1 = new P(10);
System.out.println("------");
} class S extends R
}
237. Program {

class Q S(int i)

{ {

Q() System.out.println("S(int)");

{ }

System.out.println("Q()");

} {

System.out.println("S-IIB");

{ }

System.out.println("Q-IIB");

} public static void main(String[] args)

} {

S s1 = new S(90);

System.out.println("-----");

www.laratechnology.com Page 50
LARA_TECHNOLOGIES 2013
R r1 = new R(); }

System.out.println("-----");

Q q1 = new Q(); class V extends U

System.out.println("-----"); {

} V()

} {

238. Program this(10);

class T System.out.println("V()");

{ }

System.out.println("T-IIB1"); {

} System.out.println("V-IIB");

T()

{ V(int i)

System.out.println("T()"); {

} System.out.println("V(int)");

System.out.println("T-IIB2"); public static void main(String[] args)

} {

} T t1 = new T();

class U extends T System.out.println("----");

{ U u1 = new U();

U() System.out.println("----");

{ V v1 = new V();

System.out.println("U()"); System.out.println("----");

} V v2 = new V(10);

www.laratechnology.com Page 51
LARA_TECHNOLOGIES 2013
System.out.println("----");

} class F
{
}
public static void main(String[] args)
{
239. Program
A a1 = new A();
class A
System.out.println("done");
{
}
static
}
{
System.out.println("A-SIB");
}
}

class B extends A
240. Program
{
static
class G
{
System.out.println("B-SIB"); {
}
} G()

{
class C extends B
System.out.println("G()");
{
static
}
{
System.out.println("C-SIB");
}
} {

System.out.println("G-IIB");
class D
}
{
public static void main(String[] args)
{
B b1 = new B(); static
System.out.println("done");
} {
}
System.out.println("G-SIB");

}
class E
{ }
public static void main(String[] args)
{
C c1 = new C();
System.out.println("done"); class H extends G
}
} {

www.laratechnology.com Page 52
LARA_TECHNOLOGIES 2013
H() }

{ }

System.out.println("H()"); class J

} {

public static void main(String[] args)

static {

{ G g1 = new G();

System.out.println("H-SIB"); System.out.println("-----");

} H h1 = new H();

System.out.println("-----");

{ I i1 = new I();

System.out.println("H-IIB"); System.out.println("-----");

} }

} }

class I extends H class K

{ {

I() public static void main(String[] args)

{ {

System.out.println("I()"); H h1 = new H();

} System.out.println("-----");

I i1 = new I();

static System.out.println("-----");

{ G g1 = new G();

System.out.println("I-SIB"); System.out.println("-----");

} }

System.out.println("I-IIB"); class L

www.laratechnology.com Page 53
LARA_TECHNOLOGIES 2013
{ System.out.println("N-IIB1");
}
public static void main(String[] args)
static
{
{
System.out.println("SIB");
I i1 = new I();
}
System.out.println("-----");
N(int i)
G g1 = new G(); {
super(i);
System.out.println("-----"); System.out.println("N(int)");
}
H h1 = new H();

System.out.println("-----"); {
System.out.println("N-IIB2");
} }
}
}
class O extends N
241. Program {
class M O()
{ {
M() this(90);
{ System.out.println("O()");
System.out.println("M()"); }
} O(int i)
{
{ super(90);
System.out.println("IIB1"); System.out.println("O(int)");
} }

static {
{ System.out.println("O-IIB1");
System.out.println("SIB"); }
}
static
M(int i) {
{ System.out.println("O-SIB");
this(); }
System.out.println("M(int)"); }
}
} class P
class N extends M {
{ static
N() {
{ System.out.println("P-SIB");
System.out.println("N()"); }
} public static void main(String[] args)
{
{

www.laratechnology.com Page 54
LARA_TECHNOLOGIES 2013
O o1 = new O();
System.out.println("-----");
M m1 = new M();
System.out.println("-----");
N n1 = new N(20);
System.out.println("-----");
}
}

class Q
{
static
{
System.out.println("Q-SIB");
}
public static void main(String[] args)
{
N n1 = new N();
System.out.println("-----");
M m1 = new M(20);
System.out.println("-----");
O o1 = new O(80);
System.out.println("-----");
}
}

Last
line……………………………………………………………………
…….

www.laratechnology.com Page 55

You might also like