LARA TECHNOLOGIES NEW BATCH 7-9AM
1. Program class Hello { public static void main(String args[]) { [Link]("Hello World!"); } } 2. Program class HelloAgainAndAgain { public static void main(String[] args) { [Link]("Hello World!"); [Link]("Hello World!"); [Link]("Hello World!"); [Link]("Hello World!"); } } 3. Program class A { public static void main(String[] args) { [Link]("Hello World!"); [Link](100); [Link](20.909); [Link](true); [Link](30 + 20); [Link](30 == 30); } } 4. Program class B { public static void main(String[] args) { inti = 10; [Link](i); } } 5. Program class B { public static void main(String[] args){ int j; [Link](j); } } 6. Program class C { public static void main(String[] args) { inti = 10; [Link](i); i = 20; [Link](i); i = 30; [Link](i); } }
201 2
7. Program class D { public static void main(String[] args) { inti; i = 10; [Link](i); } } 8. Program class E { public static void main(String[] args) { inti; [Link](i = 10); [Link](i); } } 9. Program class G { public static void main(String[] args) { inti, j; i = 0; j = 20; [Link](i + j); } } 10. Program class I { public static void main(String[] args) { int k = 1; [Link](k++); [Link](k); } } 11. Program class J { public static void main(String[] args){ inti = 1; [Link](++ i); [Link](i); } } 12. Program class K { public static void main(String[] args) { inti = 1; [Link](i ++); [Link](i); i = 2; [Link](i --); [Link](i);
[Link]
Page 1
LARA TECHNOLOGIES NEW BATCH 7-9AM
i = 3; [Link](++ i); [Link](i); i = 4; [Link](-- i); [Link](i); } } 13. Program class L { public static void main(String[] args) { inti = 1; int j = i ++; [Link](i); [Link](j); } } 14. Program class N { public static void main(String[] args) { inti = 0; int j = i ++ + i; [Link](i); [Link](j); } } 15. Program class P { public static void main(String[] args) { inti = 0; int j = i++ + ++i + i++ + ++i; [Link](i); [Link](j); } } 16. Program class T { public static void test() { [Link]("test"); } public static void main(String[] args) { [Link]("Hello World!"); } } 17. Program class W { static void test() { [Link]("from test");
201 2
} public static void main(String[] args) { [Link]("Hello World!"); test(); } } 18. Program class X { static void test(){ [Link]("from test"); } public static void main(String[] args){ [Link]("------"); test(); test(); test(); [Link]("------"); } } 19. Program class B { public static void main(String[] args) { [Link]("Hello World!"); test(10); } static void test(inti) { [Link](i); } } 20. Program class D { public static void main(String[] args) { inti; int j; i = 10; j = 20; [Link]("i value:" + i + ", j value is:" + j); } } 21. Program class F { public static void main(String[] args) { inti = 20; test(i); [Link]("done:" + i); }
[Link]
Page 2
LARA TECHNOLOGIES NEW BATCH 7-9AM
static void test(int k) { k = 30; } } 22. Program class G { public static void main(String[] args) { inti = 10; [Link]("main1:" + i); test(i); [Link]("main2:" + i); } static void test(inti) { i = 40; } } 23. Program class H { static int test() { return 20; } public static void main(String[] args) { inti = 10; [Link]("1:" + i); i = i + test(); [Link]("2:" + i); [Link]("3:" + test()); } } 23. Program class I { public static void main(String[] args) { inti = 10; [Link](test(i)); [Link](i); } static int test(inti) { return i++; } } 24. Program class J { public static void main(String[] args) { inti = 0;
201 2
int j = i++ + test(i) + i; [Link](i); [Link](j); } static int test(inti) return i++; } {
} 25. Program class A { static inti; public static void main(String[] args) { [Link](i); } } 26. Program class B { static inti; static void test() { [Link]("from test:" + i); } public static void main(String[] args) { [Link]("from main:" + i); } } 27. Program class C { static inti = 10; public static void main(String[] args) { [Link](i); } } 28. Program class D { static void test() { [Link]("from test:" + i); } static inti; public static void main(String[] args) { [Link]("from main:" + i); i = 10; test(); }
[Link]
Page 3
LARA TECHNOLOGIES NEW BATCH 7-9AM
} 29. Program class E { static inti = 10, j; public static void main(String[] args) { [Link](i); [Link](j); } } 30. Program class F { static inti, j = 10; static int k; public static void main(String[] args) { [Link](i); [Link](j); [Link](k); [Link](m); [Link](n); [Link](p); } static int m, n = 30, p; } 31. Program class G { static inti; public static void main(String[] args) { [Link](i); i = 10; [Link](i); inti = 20; [Link](i); i = 30; [Link](i); } } 32. Program class H { static inti; public static void main(String[] args) { [Link](i); [Link](H.i); i = 10; [Link](i); [Link](H.i); H.i = 20; [Link](i);
201 2
[Link](H.i); }
} 33. Program class X { static inti; public static void main(String[] args) { inti = 10; [Link](i); [Link](X.i); i = 20; X.i = 30; [Link](X.i); [Link](i); } } 34. Program class A { static inti = 10; static int j = i; public static void main(String[] args) { [Link](i); [Link](j); } } 35. Program class D { static inti = j; static int j = 10; public static void main(String[] args) { [Link](i); [Link](j); } } 36. Program class E { static inti = 10; static int j = i; static int k = m; static int m = j; public static void main(String[] args) { [Link](i); [Link](j); [Link](k); [Link](m); }
[Link]
Page 4
LARA TECHNOLOGIES NEW BATCH 7-9AM
} 37. Program class G { static inti = test(); static int test() { return 10; } public static void main(String[] args) { [Link](i); } } 38. Program class H { static inti = test(); static int j = 10; static int test() { return j; } public static void main(String[] args) { [Link](i); [Link](j); } } 38. Program class J { static int x = test(); static int test() { [Link]("A:" + x); return 10; } public static void main(String[] args) { [Link]("B:" + x); } } 39. Program class N { static { [Link]("SIB"); } } 40. Program class A { public static void main(String[] args) { [Link]("Hello World!"); } static {
201 2
[Link]("SIB"); }
} 41. Program class B { static
{ [Link]("SIB1");
} public static void main(String[] args) { [Link]("Hello World!"); } static { [Link]("SIB2"); } } 42. Program class C { static
{ main(null);
} public static void main(String[] args) { [Link]("Hello World!"); } } 43. Program class D { static { [Link](1); main(null); [Link](3); } public static void main(String[] args) { [Link]("from main"); } } 44. Program class E { static inti = test(); static int test() { main(null); return 20; } public static void main(String[] args) {
[Link]
Page 5
LARA TECHNOLOGIES NEW BATCH 7-9AM
[Link]("main:" + i); } } 45. Program class G { static inti = 10; static { [Link](i); } public static void main(String[] args) { [Link](i); } } 46. Program class H { static inti = 20; static { i = 10; } public static void main(String[] args) { [Link](i); } } 47. Program class I { static { x = 10; } static int x = 20; public static void main(String[] args) { [Link](x); } } 48. Program class A { inti; public static void main(String[] args) { A a1 = new A(); [Link](a1.i); } } 49. Program class H { inti; public static void main(String[] args) { H obj = new H();
201 2
[Link](obj.i); obj.i = 10; [Link](obj.i);
} } 50. Program class J { int x, y = 10, z; public static void main(String[] args) { J obj1 = new J(); [Link](obj1.x); [Link](obj1.y); [Link](obj1.z); } } 51. Program class K { inti; public static void main(String[] args) { K k1 = new K(); k1.i = 10; K k2 = new K(); k2.i = 20; [Link](k1.i); [Link](k2.i); } } 52. Program class B { inti; double d; boolean b; public static void main(String[] args) { B b1 = new B(); [Link](b1.i); [Link](b1.d); [Link](b1.b); } } 53. Program class C { inti; int j = 10; C() { i = 20; } public static void main(String[] args) {
[Link]
Page 6
LARA TECHNOLOGIES NEW BATCH 7-9AM
C c1 = new C(); [Link](c1.i); [Link](c1.j); } } 54. Program class E { E() { [Link]("E()"); } public static void main(String[] args) { E e1 = new E(); [Link]("----"); E e2 = new E(); } } 55. Program class J { J(int x) { [Link]("X(int x)"); } J(byte y) { [Link]("X(int y)"); } public static void main(String[] args) { J obj = new J(90); [Link]("done"); } } 56. Program class Q { Q(inti) { this(); [Link]("Q()"); } Q() { this(20); [Link]("Q(int)"); } } 57. Program class R { R() { this(10); [Link]("R()"); } R(inti) { [Link]("R(int)"); } } 58. Program class S { S() {
201 2
[Link]("S()"); } { [Link]("IIB"); } public static void main(String[] args) { S s1 = new S(); [Link]("------"); S s2 = new S(); [Link]("------"); } } 58. Program class A { A() { [Link]("A()"); } { [Link]("IIB1"); } { [Link]("IIB2"); } public static void main(String[] args) { A a1 = new A(); [Link]("-----"); A a2 = new A(); [Link]("-----"); } } 59. Program class C { { [Link]("IIB1"); } public static void main(String[] args) { C c1 = new C(); [Link]("-----"); C c2 = new C(); [Link]("-----");
[Link]
Page 7
LARA TECHNOLOGIES NEW BATCH 7-9AM
} } 60. Program class D { static { [Link]("SIB"); } { [Link]("IIB"); } public static void main(String[] args) { D d1 = new D(); [Link]("-----"); D d2 = new D(); [Link]("-----"); } } 61. Program class F { F() { [Link]("F()"); } { [Link]("IIB"); } F(inti) { this(); [Link]("F(int)");
201 2
B b1 = new B(); [Link](b1.i); [Link](b1.j);
} } 63. J2SE stands for? [Link] stands for? 65. How many classes can be in a java source file? [Link] it possible to make empty java source file? [Link] many maximum public classes can be in one java source file? [Link] command is used to compile java source file? [Link] command is used to run java programs? [Link] to represent current directory in the windows Operating System? [Link] using which command we can update any environment variable for command prompt wise? [Link] is the default value to local variable? [Link] is the default value to global variable of type Boolean? [Link] is the process of passing variable to another method (by value/by reference)? [Link] it possible to keep a method name as a class name itself? [Link] it possible to execute something before main method execution? [Link] it possible to keep super calling statemenet from any place of the constructor body? [Link] using which key word, we can make a sub class from the existing class? [Link] to call another constructor of the same class from the constructor body? 80. Javac command is there inside a lib folder of jdk installation(T/F)? 81. cd stands for? 82. . . represents?
} public static void main(String[] args) { F f1 = new F(); [Link]("-----"); F f2 = new F(20); [Link]("-----"); } } 62. Program class A { inti; } class B extends A { int j; public static void main(String[] args) {
[Link]
Page 8
LARA TECHNOLOGIES NEW BATCH 7-9AM
[Link] is the mandatory to install jdk? 84. How many ways are there to set a path? 85. Is it possible to use localvarible without initialization? 86. args is an identifier(T/F)? 87. String is a keyword(Y/N)? 88. class is identifier(T/F)? 89. public is a keyword(Y/N)? 90. What is the argument of a main method? 91. Is it possible to develop a java program outside of a jdk installation(Y/N)? 92. How many steps should be taken ,in order to compose a simple helloworld program? 93. static is a keyword(T/F)? 94. Object is storing in heap(T/F)? [Link] is a keyword(T/F)? [Link] is a keyword(T/F)? [Link] variable is storing in heap(T/F)? 98. Which keyword used for differentiating local and global variable? 99. Is it possible to access static members from the non-static members? 100. What is the super class of all classes?
201 2
[Link]
Page 9