java2018 25 May,2021 boomtecho2@gmail.comLeave a comment 1. JRE stands for Java Realtime Environment None of the above Java Runtime Environment Java Rapid Enterprise 2. Java servlets are an efficient and powerful solution for creating ………..for the web Dynamic content Both A and B Hardware static content 3. JDK in java stands for none of these java decompilation kit Java debugging kit java developer kit JDK full form is JAVA DEVELOPMENT KIT 4. In HTTP a client can directly connect to a server using Domain TELNET Web based connection Linear Connection 5. Single line comment starts with this in java /* // /** none of these 6. Which of the following class is superclass of every class in java ? Abstract class Object class String class Array list class 7. What should appear at the very end of your JavaScript ? <Script Language=”JavaScript”> none of the above The end statement 8. Which Among the following character escape code is not available in Java ? \t \r \a \v 9. public class test { public static void main (String []args) { int i; for(i=0;i<6;i++) { if(i<3) continue; }System.out.println(i); }} 3 4 2 6 10. Java Source code is compiled into : .exe bytecode .obj Source code 11. Following file human readable in java Programming language. .class java .obj .jar 12. What is the prototype of the default constructor Test () Test (void) Public Test () Public Test (void) 13. What will be the result int i=10; while (i++<=10) { i++; } System.out.print(i); 12 10 13 11 14. Divided by zero is ? System error Output error Run time Error syntax error Exception in thread "main" java.lang.ArithmeticException: / by zero at C.main(Main.java:7) 15. Which member from http Response class is used to store the response from a http server ? status response status address status code 16. This package is used by compiler itself ,so it does not need to be imported for use . java.lang java.math java.applet java.awt 17. Which of these operator has highest precedence () >> ++ * 18. Method used to remove component from the display hide() disappear() remove() delete() 19. Which one of the following is a jump statement in java goto break if jump 20. Which of these selection statement test only for equality ? None Of the mentioned Both A and B switch if 21. if (1+1+1+1+1==5) { System.out.print("TRUE"); } else { System.out.print("FALSE"); } Compiler Error FALSE None Of these TRUE 22. What is stored object obj in the following lines of code ? box obj ; Null Any arbitrary pointer Memory Address of allocated memory of object Garbage 23. Find the output: public class test { public static void main(String arg v[]) { int [] arr=new int [][1,2,3]; System.out.println(arr[1]); }} Error : size of array must be defined 2 1 Error : arr is referenced before it is initialized 24. java programming was designed by : Mozilla corporation Amazon Inc Sun MicroSystem Microsoft 25. it is an important feature of java that it always provides a default constructor to a class true none of the above not supported false 26. Which method of class string is used to extract a single character from a string object chat at() Char At() CHARAT() Chat At() 27. Which of the following do not represent legal flow control statements? break; continue outer; exit(); return; 28. with x=0; which of the following are legal lines of java code for changing the value of x to 1? x++; x=x+1; x+=1; x=+1; 3 & 2 1&4 1,2 and 3 1,2,3 &4 29. Which operator will always evaluate all the operands ? || && ?: % 30. What is the value stored in x in the following lines of code ? int x ,y,z; x=0; y=1; x=y=z=8; 0 9 1 8 31. Who is called the father of java programming language James Gosling Larry Page Bjarne stroustrup None of these 32. The Active X Controls Run over the internet by creating a .........file jpeg cab doc exe 33. If m and n are int type variables, what will be the result of the expression m%n where m=5 and n=2? 2 1 None of the above 0 34. Which is the root class of all AWT events java.awt.event.AWTEvent java.awt.AWTEvent java.awt.Action Event java.awt.event.Event 35. The bitwise XOR operator is denoted by ~ & 1 ^ 36. The default layout manager of a frame is : Border Layout Flow layout Grid layout Box Layout 37. Which of the following method belongs to the string class ? all of them compareto() length() equals() 38. What will be output ? String S1="S1="+"123"+"456"; String S2="S2="+(123+456); S1=123456,S2=123456 S1=579,S2=579 S1=12456,S2=579 none of these 39. Which of the following for loops will be an infinite loop? for (i=0;;i++) for (i=0;i<1;i--) All of the above for (;;) 40. Http uses services of TCP on well-known port 83 well-known port 82 well-known port 81 well-known port 80 41. Each method in java class must have a unique name Not necessary True False None of the above 42. What is the extension of an ASP file ? .asp.vb .aspx .asp aspx.vb 43. Which declaration of the main() method is valid? public static void main (string []arr) public void static main (string args[]) final public static void main(string [] arr) public void main(string args[]) 44. The New Operator creates a variable called new Obtains memory for a new variable tells how much memory is available returns a pointer to a variable 45. Which of the following converts human readable file into platform independent code file in java ? Compiler JVM Applet JRE 46. Runnable is a : Interface Method class variable 47. Size of int in java is. 64 bit 32 bit Depends on execution environment 16 bit 48. What is the output of the program class alligator { public static void main (String args[]) { int []x[]={ {1,2},{3,4,5},{6,7,8,9}} int [][]y=x; system.out.println(y[2][1]); }} Compilation Error 7 2 3 49. Which method will show the form data in Query string ? GET POST None SHOW 50. Which of this is not a client side scripting language Javascript PHP none VBscript 51. A private class is accessible from inside a class package Method None 52. Which of the following is a loop construct that will always be executed once ? do-while for while switch 53. Which of the following is not mandatory in variable declaration? an identifier a data type a semicolon an assignment 54. Command to execute a compiled java program is : java run execute javac 55. A package is a collection of classes and interface interfaces classes editing tools 56. Name the keyword that makes a variable belong to a class ,rather than being defined for each instance of the class. Abstract public static final 57. Which of this is not the component of Active X Architecture Apache DCOM Active X Control HTTP 58. Bytecode is given as input to : JVM JRE Linker Assembler 59. Java Program are : Platform independent Platform dependent Interpreter dependent interpreter independent 60. Which user action will not generate a server side event? All of the above Text Change Mouse Move Button Click 61. The Class used for drawing graphics in an application is : Layer Container Canvas Graphics 62. Which property in ASP is used to name a web control ? ID Name Designation Control Name 63. Which of these is not a valid server side scripting language VB script ASP PHP JSP 64. The variables declared in a class for the use of all methods of the class are called none of these instance variables Objects reference variables 65. Which method is used to read a string from the input stream? getline() readline() read() get() 66. In Which area of memory the system store parameters and local variables whenever a method is invoked ? Stack Heap Array Storage area 67. Find the output following program class increment{ public static void main(string args[]) { int g=3; system.out.print(++g*8); } } 32 25 24 33 68. Which one is not supported by OOP? Polymorphism Abstraction Global Variable Encapsulation 69. Multidimensional arrays are actually Array of element Array of array Array of variable none of the above 70. Which of the following is not a keyword in java : abstract finalize assert boolean 71. Which of the following will produce a value of 22 if x=22.9 rint(x) abs(x) ceil(x) round(x) 72. Find the value of "x" after the execution int x=0, y=0,z=0; X=(++x + y--) * z ++ ; -1 1 0 2 73. Which of the following is true aboutJava There are no header files in java java has replaced the destructor function of c++ java does not support overloading All of the above 74. Which of these is wrapped around everything associated with a reply from an http server ? http Response http http server Http Request 75. JVM is a : Interpreter Compiler Assembler Debugger 76. jar stands for : Java Archive None of these Java Application Runner Java Archive Runner 77. SSL, stands for secure server layer session server layer secure socket layer server socket layer 78. Which statement does not create an object of class student{}? student s1; student ss=new student(); new student(); student s1=new student; s2 new student(); 79. One of the Choice is not the core technologies of Active X. Active X Scripting Active X Documents Active X HTML Active X Server framework 80. Which is not a type of method in java Dyanamic Method Static Methods Accessor Methods Instance Methods 81. The Order of three top level elements of the java source file are package,import,class Import, Package,Class Random order Class , Import,Package 82. In java programming object can take many forms .This feature is called: Polymorphism Inheritance Encapsulation Abstraction 83. What will be the output of the following code ? byte x=64,y; y=(byte)(x<<2); System.out.println(y); 0 1 2 64 84. ASP stands for : Associative System Part None Active Server Pages Active System Page 85. What is the numerical range of a char in java ? -128 to 127 0 to 32767 0 to 65535 0 to 256 86. Find result int count =0; do{ System.out.println("Welcome"); count++; } while (count<10);\ 10 8 11 9 87. Which is the correct way of importing entire package pkg import pkg* Import pkg* Import pkg import pkg 88. Java is a.......... Language. Weakly typed Moderate typed Strongly typed None of rhese 89. In Java , String is a combination of boolean none of the above Primitive Data type abstract data type 90. Which of these is not a data type ? boolean int double public 91. Primary purpose of inheritance is : overriding code reuse ignore irrelevant features from a software over loading 92. Which class can not have a subclass in java : abstract class parents class none of the above final class 93. Which of these operator is used to allocate memory to array variable in java malloc new new malloc alloc 94. Find the selection statement used in java continue for if all of these 95. A sub-class is also called as : nested class inner class hidden class derived class 96. Which of the following declaration of the array contains error int a[]={1,2,3}; int[]y=new int[5]; float d[]={1,2,3}; int x[]=int[10]; 97. The output of the following fraction of code is public class test { public static void main(String args[]) { string s1=new string("Hello"); string s2=new string("Hellow"); system.out.println(s1=s2); Hellow Hello Throws an exception Compilation error 98. ODBC stands for Open Database Command Open Database Connectivity Object Data Binding Command Open Database Console 99. Which of the following is not a valid JavaScript variable name ? -first and last First And Last None Of the Above 2 name 100. Which of these coding type is used for data type char in java ? NONE Of These ASCII ISO-LATIN-1 UNICODE Loading ...