java2015 4 Mar,2021 boomtecho2@gmail.comLeave a comment Please enter your email: 1. In Which year was java developed 1990 1991 1993 1995 2. The old name of java was.. java Green java oak ok 3. Which of following features are not supported by java Multithreading operators overloading garbage collection reflection 4. Which is ful form of JDK? Java Development kit java Dynamic Kit Java data Kit java Detailed Kit 5. If you Run the following program What lines would be include in its output class test{ public static void main(String args[]) { int i,j; for (i=0,j=0;i+j=20;++i,j+=i–) { System.out.println(i=j); } } 5 8 13 All of the above 6. What is the full form of JVM? Java virtual Machine Java Varient Machanism java virtual machanism java varience Machanism 7. Find out the error in the following code- class hello world{ public static void main(string str() ) { System.out.println(“Hello World”); }} “Hello World” can not be used as string Double semicolon is used after println();; illegal start of type () No error, code is correct 8. The Expected Signature of main method is public static void main(). What happens if you forget to put the static keyword. JVM show error that main method should be declared static Compiler warming that main method should be declared static JVM succesfully invokes the main method JVM falls at run time with no such method error 9. When source code is successfully compiled then which of the following is generated in java. output byte code object code none of the above 10. Which of the following is the compulsory section of java program. System.out.println() section class Declaration section Variable Declaration section Method Declaration 11. Which software is used to interpreys java intermediate code.? JDK JVM API All of the above 12. Who developed java? Dennis Ritchie James Goslin Petric Goslin james Ritchie 13. Which statement is correct. java is pure object oriented java not support objects java is not pure object oriented above all are wrong 14. In Which section of java code Instance varibles are declared In Constructor In Main method In class All above are correct. 15. Which method executes only once of applet life cycle. start () stop() paint() init() 16. What is Meaning of JIT? Java in Time Just in Time Java In Thread Just in Thread 17. Which file is created after compilation of java source file MyTest.java Mytest.java Mytest.class MyTest.exe Mytest.doc 18. What would be the result of compile and run of the following code. public class Test { static int x; public static void main (String args[]) { system.out.println(“value is “+x); }} vlue is 0 Null pointer Exception Variable must initialized before use compilation will fail 19. Which command will be used to compile Music.java file. java Music.java javac Music.java javac Music java Music 20. What is Wrong with the following if statement … if(x++){ y=x*z; x/=2; else{ y=y*y; ++z; } The if condition must be boolean expression,not a numeric expression,not a numeric expression. There is Missing } before the else x/=is wrong above A and B Both are correct 21. What about pointers in java ? java not support pointers java support pointers java can support pointers pointer is a keyword in java 22. Which statement is wrong about java ? java is Platform Independent Java Run on windows & unix only Java is Robust language Above all are wrong 23. Applet always executed on…. client side server side Both A & B are correct Both A & B are wrong 24. What is life cycle of Applet program in method executions…. I start() II paint() III init() IV destroy() V stop() I, II, III , IV, V III,I,II,IV,V I,III,II,IV,V I,II,III,V,IV 25. What is wrong with te following code in java. switch(i==10) { case 1: ++i; break; case 5:–1; break; case 10: i=i+2; case 11: i=i-2; default: } The switch statement must evaluate its expression to an integer value no break is used after case 10 & 11 No statement is given in default no error; code is correct. 26. If you do not give a value to a int variable in java before using it then what will happen such as int a; system.out.println(a); Compiler will give an error it will print zero value it will print garbage value none of the above 27. String contained by Which package. java.util java.lang java.class java.chars 28. What is string in java Data Type Class Array Variable 29. How many bits are allocated to a char data type variable in java at Run time. 08 bits 16 bits 32 bits 04 bits 30. Which is the type of string in java from followings? Final Abstract Private Protected 31. What is the category of string object. Mutable Immutable Primitive Char array 32. What is the base class of all classes String class parent class util class object class 33. Which of the following will declared and initialize an array with five member values.in int []a ={23,22,21,20,25} array a={23,22,21,20,25} int a[]=new int [5] int [5]array; 34. If an array element is accessed beyond the array size then which exception is show. Array element out of Bonds execution Array Element out of limit Exception Array Index out of Bounds Exception. Array Index out of Limit Exception. 35. What is output of the following code String S= “KBC”; int M= Integer.parseInt(S); Run Time execution Number format exception Compilation error Above all are wrong 36. Which of the following are valid java comments. i \\ this is a comment ii /*this is a commrnt*/ iii /** this is a comment*/ iv \*this is a comment *\ all are correct all are incorrect i & iv are correct ii & iii are correct 37. Which of the following are valid java identifiers? i %id ii $id iii _id iv #id All are correct all are incorrect i &iv are correct ii & iii are correct 38. Which of the following is not primitive type: Byte String Integer float 39. What is the range of Short data type 0 to 2^18 -(2^16) to 2^16 (-2^15) to 2 ^15 (-2^15) to 2^15-1 40. What is the output of the following program public class question { public static void main(String s[]) { boolean []b=new boolean[2]; double d[]=new double[2]; system.out.println(b[0]); system.out.println(d[1]); } } true 0.0 true 0 true 0.0 false 0 41. What is the range of char data type 0 to 2^15 0 TO 2^16-1 0 to 2^ 15-1 0 to 2^ 15 42. What is the output displayed by the following program class test { String S1= “ab”; String S2= “abcd”; String S3=”cd”; String S4= S1+S3; S1=S4; System.out.println(“S1″+((S1==S2)?”==:”!=”)+”S2″); }} S1==S2 S1!=S2 S1 S2 S1==”abcd” 43. What is wrong following program class resturant { String s=”KMP”; Public static void main(String []ab) { System.out.println(s); }} Nothing is wrong with the program String S is not declared public main() can not access non-static without a refrence main() argument list is incomplete 44. What is the output of following code String p= new String (“welcome”); String Q=new String (“welcome”); if(p==Q) System.out.println(“Thank you”); else system.out.println(“good morning”); Thank you good Morning code is wrong welcome 45. What is the wrong following statement for (i=0;j=0,i<0;++i,j+=i) { k+=1*i+j*j; } It should include more than one statement in the for loop body There should be a comma between i=0 and j=0 It uses more than one loop index above all are correct 46. What is wrong with the following code. while(p>>2) { p*=z; } The loop expression is not a boolean expression logic is not clear to a compiler p can not be used with integer above all are wrong 47. What is the output of this code int x=3; int y=10; System.out.println(y%x); 0 1 2 3 48. How can you call garbage collection by force on an object. Garbage collection can not be call by force Call system.gc() Call.Runtime.gc Above B & C both are correct 49. What is the result of the following code. int x=1; String []names={“fred”,”jim”,”sheel”}; names[–x]+=” “; for(int i=0; i<names.length;i++) { System.out.println(names[i]); } Fred Jim Sheel Array Index out of Bonds Exception 50. What is the output of the following code. String S=”Hello”; String S2=”Hello”; If(S.equals(S2)) { System.out.println(“True”); } else { System.out.println(“false”); } True False hello Hello 51. Which of the following is not keyword in java static import default transient 52. Sharing of common information is achived by the concept of following. Polymorphism Inheritance Encapsulation Abstraction 53. Which word is resrved in java main native keyword method 54. Which class not be subclass in java parents class static class final class Inner class 55. Can we Declared Abstract static method in java yes no In Some Cases All above are wrong 56. The Meaning of inheritance is sub class implements parent class sub class extends parents class both a & b are correct Both a & b are worng 57. Which type of inheritances are subported by interfaces specically isn compare to classes . Multiple Multilevel Hierarichal all of the above 58. Which type of inheritances are suported by classes. Multiple hybrid Multilevel all of the above 59. Which keyword is used to a constant in java.? static private volatile final 60. Which child class object is passed into parents class object , that refrenceing is called.? up casting down casting up & down casting all are wrong 61. When parent class object is passed into child class object that refrenceing is called? Up casting Down casting Up & Down casting All are wrong 62. How static function can be called as per following code class hello { public static void print() { }} Obj.Hello.print() Print() Hello.print() can not be called 63. Which method of java is invoked for reclaim the inaccessible memory location in java. reclaim() finally() finalize() recollect() 64. Which type of method can not be overriden abstract public final private 65. How an object k can be destroyed from a program. k delete() by garbage collection system k destroy() k finish() 66. In interface we can declare final variables declare some method define some method A & B both are correct 67. Whic is valid declaration with in an interface public double my method (); public final double my method (); static void my method (double d1) ; protected void my method (double ,d2); 68. What is true about abstract class object can not be created some method can not be define class can be used as super class only alla above are correct 69. Which container use border layout Frame Dialog both A & B Panel 70. What must be the name of java file containing this program import my package.*; public class special class code() special class code.my package java special class code .java special class code special class code .class 71. What is the value of obj[3] in the following code int obj[]; int k=0; obj=new int[5]; while(k<4) { obj[k]=10+k; k=k+1; } 11 13 12 unknown value 72. if string s=”Text” What is the value returned by s.length() 3 4 5 unknown value 73. Which is not a keyword in java Synchronized protected null super 74. Which declared an abstract method in abstract class in java. public abstact method(); abstract void method (); public void abstract method (); public void method (abstract); 75. Consider the following code and find output outer : for (int i=0;i<2;i++) { for(int j=0;j<3;j++){ if(i==j) continue outer; System.out.println(“i=”+i+”j=”+j); }} i=0 j=0 i=0 j=1 i=1 j=1 i=1 j=0 76. What is the full form of AWT Abstaract window kit any window toolkit any window tool all above wrong 77. What is the Hot Java System Software Web browser plugin java environment JDK 78. HTTP protocol is the type of Statefull stateless statewise all above are wrong 79. The (0,0) coordinates of frame window is located which position of the frame area At the upper left corner At the center of the right edge at the center of the left edge at the center 80. What should use to position a button within an application frame so that the size of the button is not affected by the frame size flow layout grid layout center area of a Border layout Grid bag layout 81. Which statement are true about Active x Activex control were originally called OLE controls Activex Controls can be Linked with web server Activex Control are reusable Software components Active x controls are developed by sun micro system 1,2 and 3 are correct 1,3 and 4 are correct 2,3 and 4 are correct All above are correct 82. How many Active X technologies ActiveX Scripting ActiveX Documents ActiveX Server Frame ActiveX Machine 1,3 and 4 are correct 2,3 and 4 are correct 1,2 and 3 are correct All are Wrong 83. ActiveX Control can operate over the Internet by creating a file of type, that file type is Cab DLL MFC HTML 84. Select tool in Which ActiveX controls are Developed Visual C++ VB Scripting Both A And B are Correct Both A And B are inCorrect 85. /ActiveX were designed to…….. the dynamic designs of a website decrease alter increase All of the above are Correct 86. What is the full form of OLE Open Linking and engine Object Linking and Engine Object Linking and Embedding Open Linking and Embedding 87. HTTP Resourses are located in net Work By Uniform Resourse Identifier Unique Resource Identity Unique Resourse Index Uniform Resource Index 88. Http Client requests by establishing a ——— connection to a particular port on the server. UDP TCP SMTP POP 89. What are true about ASP Server side Scripting Support VB Script Support J Script All of the Above 90. ASP is Active Server pages Active service pages Active Server port Active Service Port 91. COM is Component Open Machine Connection Open Model Component Object Model Connection Object Model 92. Cookies are used for Store Information at Server Store Information at cliect Store Information at Website Above all are correct 93. Which protocol transfer a file from one system to another system SMTP HTTP TCP/IP FTP 94. ASP is which type of scripting Client side scripting Server side scripting A & B both are correct A & B both are Incorrect 95. IIS is Internet Information Server Internet Information Server Internet Interaction Server Internet Interaction Service 96. Which action not generates a server side event Mouse Move Text Change Button Click none of the above 97. When an ASP file is placed on an IIS and viewed Through browser,then resulting HTML page contains All ASP code only Mix of ASP and HTML code All HTML code only Above all are Wrong 98. Java script can be work as Client side Scripting Server side Scripting Both A and B are Correct Both A and B are InCorrect 99. Which protocol facilitates to access hyper text document TCP/IP FTP SMTP HTTP 100. A protocol is referred to as The Formal set of rules and conventions The Formal set of application and documents Both A and B are Correct Both A and B are InCorrect Loading … Question 1 of 100