Java 2014 27 May,2021 boomtecho2@gmail.comLeave a comment Please enter your email: 1. Java is an language of type : Platform dependent Platform Independent above both are correct Above both are incorrect 2. If we have a statement in a program like this a.b(c); What does it mean a & b are methods a & b are objects a is object or class none of above 3. A java String is Not Null termination Null terminated null initialized Never haveing characters 4. In java floating point types are of : 3 types 4types 1 type 2 types 5. What is the output of these statements final int STORE=100;STORE=200; STORE=200 STORE=300 STORE=NULL Error 6. String created using string buffer class are of : Fixed length Variable length Both A and B are correct Both A and B are Incorrect 7. int i=10; i=i++ + ++i; System.out.println(i); Then what is the final value of in output 21 22 23 24 8. One of the Choice is not the core Technologies of Active X Active X HTML Active X Scripting Active X Documents Active X Server framework 9. Web server is basically HTML Server HTML client HTTP Client HTTP server 10. int n=1; while (n=10) System.out.println(n++); What will be the output of this program? Incompatible type error 10 will print infinite times 11 will print infinite times not any output. 11. In AWT, the various controls are : Label Button TextArea All of the above 12. This is a valid method declaration : int add(int x,int y) int sum(int x, y) sum(int x,int y) divide(int,int) 13. Java Arithmetic operator include : Addition operator(+) Multiplexing operator(*) Modulator (%) All of the above 14. Java C is a Ed Editor Interpreter Compiler 15. The standard default value of an instance variable of type string is : NULL null 0 there is no default value 16. A script is a part of : HTML file Java file C++ file None of the above 17. Boolean variable can have values True False Both A and Are Incorrect Both A and Are correct 18. A String in Java is an object of class Stringer String String Objects string 19. Applet code is Compiled and then Interpreted Interpreted and then compiled create and Interpreted Directly able to run 20. Using Active X documents this gets added in internet browser : Device Driver Windows Registry Editor Microsoft Word Toolbar None of the above 21. Java is such a kind of language which is : loosely typed liberally typed concisely typed strongly typed 22. int a=1; int b=0; for (;b<8;++b) a=a+a; system.out.print(a); What is the final value of a ? 128 256 512 1024 23. Web Browser is a HTML Client HTTP Client HTTP Server HTML 24. these kind of arguments are used in definition of method formal Actual Informat All of the Above 25. This statement &2=&3.to Lower case() dose this Converts string &2 to lower case Converts string &3 to lower case Converts both the string to upper case Converts string &3 to upper case 26. int i=1; do i+=2; while(i<10); which statement is correct about the above code . Compilation Error loop will run 4 times Both A and B are incorrect Both A and B are correct 27. A static method can access : static & not-static variables of that class Only static variables & methods of that class static and non-static methods of that class Only static methods & non-static variables of that class 28. This give the length of string &1 : length (&1) &1(length) &1.length() length.&1() 29. JDK means Java Development Korner java Debugging Kit java Development Kit Java Design Kit 30. Can OLE work Without Internet connectivity ? Yes No Indeterminate None of the Above 31. Which declaration is invalid static int c; final int i, int b; long l; 32. This is not type of integer in java ? Byte Short Bit Long 33. Active X is based on : Component Object Model Compound Object Model Classified Object matters None of the Above 34. int c=3,if(c=>3) system.out.println(“OK”); What is the output of this program? OK “OK” ERROR None of the above 35. In java which statement is used to create simple Button control : import java.awt.y; import java.io.y; Above both are correct Above both are not correct 36. gender=1; if(gender==1) System.out.println(“man”); else System.out.println(“women”); What will be the output? man women man and then women woman and the man 37. Continue statement is used for : Asking the Compiler to start new iteration Skipping next statements in current iteration Both A and B are Correct Both A and B are Incorrect 38. String objects are : Mutable garbage immutable classes 39. This is the default language of ASP VB Script Perl java script python 40. HTTP client and HTTP server Interact using HTTP Request HTTP Response Both A and B are correct Both A and B are incorrect 41. What is the output of this program public class check { public static void main(String []args) int a =55; int b=13; int c=2; System.out.println(a/b/c); } } 2.115 8 2 2.1 42. The package which is automatically imported is : java.lang java.util java.io there is no concept of automatic import 43. If a=8 b=6 c=5 d=2 What will be the output of : a*(b+c)/d 42 44 40 46 44. The Sequence of methods execution in applet life cycle is init(), stop(),start(),destroy() start(),init(),stop(),destroy() start(),stop(),init(),destroy() init(),start(),stop(),destroy() 45. int i=5; if(i=10) system.out.println(“OK”); else system.out.println(“Not Ok”); What will be the output OK Not OK Compilation error Not any output 46. How Many Levels of nesting is allowed in java where break or continue statements are not allowed : One Two Three None 47. if (a>b) System.out.println(“India”); System.out.println(“world”); else System.out.println(“universe”); The output of this program will be ‘world’ when a>b a always None of the above 48. Which statement does nothing? a=b; b=10; ; i++; 49. Which main interface of Active X control : I Query I think I known I Unknow 50. Java Applet Can run in : Applet Viewer Browser Both A and B Are correct Both A and B Are Incorrect 51. Through Active X server scripts we can provide dynamic content from : Server side databases Server side browser Both A and B are incorrect Both A and B are correct 52. The Term JVM means : Java Void Markup Just Visual Method Java virtual Mechanism Java Virtual Machine 53. Which is valid java statement int a=10,b=40; int a,b=40; Both A and Are Invalid Both A and Are valid 54. We can create active server pages file using in : Any text editor Visual studio IDE Both A and B correct Both A and B are Incorrect 55. What is the range of data type short in java ? -128 to +127 -32768 to +32767 -2147483648 to +2147483647 None of the above 56. Virtual Machine code is converted to actual machine code by : Java Compiler Java Byte code Java Interpreter All of the Above 57. Which can be declared final ? Class Method Member variable All of them 58. This is not a legal Identifier : Number -10 $ world +volatile Count 175 59. Applet uses this method to display out on screen : design paint display init 60. What is the output of System.out.print(++6); 7 6 Compilation error Interpretation error 61. Applet converts a web page from Dynamic to static Dynamic to Debugged Dynamic to Executable static to Dynamic 62. int a=(int)3.99; System.out.println(a); output is : 3.99 3 3.0 4 63. Frame class is this kind of class with respect to window class superclass subclass sibling class All of the above 64. switch(i) { case 1 : System.out.println(“1”); case 2 : Sysetm.out.println(“2”); break; case 3 : Sysetm.out.println(“3”); break; default: System.out.println(“nothing”); break; } What is the output if i is 1? 1 2 21 12 65. We can append string &2 to string &1 using : &2=&2+&1 &1=&1-&2 &2=&1-&2 &2=&1+&2 66. If we type cast a float variable into double there will be : Loss of data No loss of data the data will be unchanged this is not possible 67. If a variable of type int is type cast in variable of type there will be : Loss of data No loss of data the data will be unchanged this is not possible 68. In java the event handing is done by using the classes of package : java.awt.y; java.awt.event.y; java.applet.y; all of the above 69. In Java Main Method returns value of type float Does not return a vlue Return value of type double Does not need any values 70. This file can support dynamic web content data html data asp Both A and B Are correct Both A and B Are Incorrect 71. What will be the output of the program? class test { public static void main(String Args[]) { int x=20; string sup=(x<15)?”small”(x<22)?”tiny ” : “huge”; System.out.println(sup); } } small tiny huge compilation fails 72. An HTML document is always a collection of : Java Console Application Java Applets Java applets and Applications None of these 73. Frame Border and Menu bar can be drawn using this class : Frame Panel Applet none of the above 74. Frame class inherits methods of : Window class container class Both A and B are correct Both A and B are incorrect 75. Which is not Primitive data type in java . int char boolean String 76. What is the output of this statement System.out.println(+4+2); +4+2 6 42 error 77. What will be the output of this program: class test { public static void main(String args[]) test p=new test(); p.start(); } void start() { boolean b1= false; boolean b2=fix(b1); System.out.println(b1+ “”+b2); } boolean fix (boolean b1) { b1=true; return b1; } } True true false true true false false false 78. This Kind of file is required to run applet HTML CPP SQL BMP 79. class abc { int x; void method1 () { int y; x=750; y=x; } void method2() { int z; x=150; z=x+y; } } Which statement is illegal here ? y=x; int x; z=x=y; all of the above 80. The package is a collection of Methods Classes Objects Java 81. Which of the following are legal lines of java code . int w =(int )888.8; byte x=(byte)100L; long y=(byte) 100; long z=(int)100.25 1 and 2 2 and 3 3 and 4 all statements are correct 82. What is the Output ? double a=11/4 System.out.println(a); 2.0 2.36 2.75 3.0 83. This file contains java byte code : Test.class Test.java Test.html None of the above 84. ActiveX technologies include Active X supporting : Scripts HTML Extension Server Extension All of the above 85. The Tools in Which programs wants to build active X controls. Visual Basic Visual C++ Borland Delphi All of the Above 86. Which statement is correct? Division operator has higher precedence than addition Modulus operator has higher precedence than division. Both A and B are correct Both A and B are incorrect 87. Active X control was formerly known as : OLE java Automatic control OLE control Automatic OLE 88. In Java Inheritance are of these types. Single , multilevel single , multilevel, multiple single,multilevel,multiple,double single,multilevel,multiple,double,hybrid 89. The Active X Controls Run over the internet by creating a file with extension. .exe .cab .obc .vb 90. Which is not Java keyword Java Integer int All of the Above 91. A Simple java application which does not use any graphics code is : Appletviewer based Applet based Console Based Browser Based 92. A variable of data type byte can take this range of value -128 to +128 -127 to +127 -128 to 127 -127 to +128 93. Break statement is used for : Asking the Compiler to start new iteration jumping out of a loop Both A and Are correct Both A and Are Incorrect 94. This is not a web server Internet Information server Microsoft Visual C++ Both A and B are incorrect Both A and B are correct 95. Access the variables and methods outside the class this operator is used semicolon (;) colon(,) dot(.) sizeof() 96. if a=9 b=12 c=3 d=2 What will be the value of x=a-b/(3*c)*(d-1) 7 8 9 6 97. This method is started each time the user of a browser revisite the HTML page on which an applet resides Restart start review view 98. Java supports this/these kind of inheritance directly without need of using instances: Single & Multilevel single & multiple both single and multiple none of single and multiple 99. This can be type of java variables Instance variable class variable local variable All of the above 100. AWT Means Abstract Window toolkit Abstract window tools Abstract window technique none of the above Loading … Question 1 of 100