JAVA 2019 18 Jun,2021 boomtecho2@gmail.comLeave a comment Please enter your email: 1. which of these is a wrapper around everything associated with a reply from an http server? HTTP Http request Http Response http server 2. Java Allows programmers to develop the following : Appletes, Applications and servlets Applets and applications Appletes , Applications , servlets , java beans and distributed objects None of the above 3. Which of the following is not a mail server ? Apache WAMP IIS Windows 4. Give The Abbreviation for AWT: Applet Windowing ToolKit Abstract Windowing Toolkit Absolute Windowing Toolkit None of the above 5. Which of the Method of class string is used to obtain a length of string object 😕 get() sizeof() lengthof() length() 6. What will be the output of this program is : class string-demo { public static void main(String args[]) { char chars[]={‘a’,’b’,’c’}; String S=new String (chars); System.out.println(S); } } a b c abc 7. Size of byte data type is : 8 bits 16 bits 32 bits None of above 8. Which of the coding type is used for data type characters in java ? ASCII ISO-LATIN-1 UNICODE NONE OF THE ABOVE 9. & operator can return : Integer Boolean Character Integer or Boolean 10. Literals in java must be appended by which of these ? L I L and I D 11. Which of these can be overloaded ? Methods Constructions All of the Above None of the Above 12. output of the code : String S1=”yes”; String S2=”yes”; String S3=new String (S1); S1==S2 S1=S2 S3==S1 S3=S1 13. What will be the result of expression 13&25? 38 25 12 9 14. Which of these is a valid method declaration? void method1 void method2() void method 3(void) methods(void) 15. What is the type and value of following expression? -4+1/2+2*-3+5.0; int-5 double-4.5 double -4 double -5.0 16. Which of the variable declaration not compile in java program ? Int var; int var-1; int 1-VAR; int var1; 17. In java objects are passed as : Default constructor Memory address method called call by value Constructor 18. Which is not a searching technique ? Linear Binary Selection All of the Above 19. Father of Java programming is : James Gosling M.P java Charles Babbage Blais Pascal 20. Which provides run Time environment for java byte code to be executed ? JDK JVM JRE JAVAC 21. Which one of the following is a java keyword? NULL Sizeof Friend Extends 22. Which of the following is an access modifier ? Public Private Protected All of the Above 23. Full Form of JVM is : Java variable Machine Java Virtual Method java Virtual Machine Java Versatile Machine 24. All syntax Error are Called : Compile Time Exception Run Time Logical 25. Which of these is not used to take input from use in java? Scanner Input stream reader scanf Command line arguments 26. Subclass of which following class can not be created ? final public static abstract 27. Who invented java language ? Microsoft Sun Microsystem Google Amazon 28. Which of these is converted into Machine code by java interpreter? User code Bit code Byte code Machine code 29. Which of valid declaration of a float ? foat F=1F; float F =”1″; float F=1.0d; floatF=1.0; 30. Which symbol is used to denote a multiline comment in java ? <> // {} /**/ 31. It is process of removing error found in the program: Running Compiling Debugging Editting 32. Order of three top level elements of java source file is : Package , Import ,Class Class , Import, Package Random Order Import, class, Package 33. Which of these is a part of Abstract Window toolkit ? display() paint() drawstring() transient() 34. server side script is : visible to end user Invisible to end user Defined to user None of the above 35. server side script is : visible to end user Invisible to end user Defined to user None of the above 36. Which one is a valid declaration of boolean ? boolean b1=1; boolean b2=’false’; boolean b3 =false; boolean b4=”true”; 37. How to sort an array? Array.sort() Arrays.sort() Collection.sort() System.sort() 38. What will this code print ? int arr[]=new int [5]; System.out.println(arr); 0 value stored in arr[0] 00000 Garbage value 39. Which of these have highest precedence ? () ++ * >> 40. What would be behaviour if the constructor has a return type ? Compilation error RunTime Error Compilation and runs sucessfully only string return type is allowed 41. What will S2 contain after following lines of code ? String S1=”one”; String S2=S1.concat(“two”); one two onetwo twoone 42. We can not create subclass of ? final public static abstarct 43. Which of the following package is used to create and implement applet ? java.out java.until java.lang java.applet 44. life cycle of thread is controlled by : JDK JRE JVM none of the above 45. Full Name of JDBC is : Java Database Connectivity Java Database Community Java Database Concept Java Database Communication 46. Which will legally declare construct and initialize an array? int [] mylist={“1″,”2″,”3”}; int []mylist=(5,8,2); int mylist[][]={4,9,7,0}; int mylist[]={4,3,7}; 47. The Minimum value of char type variable is : ‘\U0020’ ‘\U00FF’ ‘\U0010’ ‘\U000’ 48. Which one is not Supported by OOP? Abstraction Polymorphism Encapsulation Global Variables 49. Java Program are : Platform – dependent Interpreter-dependent Platform – Independent Interpreter- Independent 50. When a method is made static , What it can not use ? this super Both A and B None Of the above 51. In Java , main () method returns a value of type : void int real string 52. Which of the following is not a Wrapper class? vector Character Boolean Integer 53. Evaluate the value of expression ? 6-2+10%4+7 10 12 13 14 54. The && and || operators : Combine two numeric values Compare two boolean value Combine two boolean values Compare two numeric values 55. Which of the following is used with switch statement ? continue exit break do 56. What is the valid data type for variable “a” to print “Hello World”? Switch (a) { System.out.println(“Hello World”); } int and float byte and short char and long byte and char 57. Which of the following is not a decision making statement ? if if-else switch do-while 58. Which of the following is not a valid jump statement in java ? break go-to continue return 59. The class at the top of the AWT Hierarchy is : Component Window Container Frame 60. Frame control Act as a : Event Method Class Container 61. The ____is a tool for both the input and output purpose. Label Textbox Combo box Command Button 62. Which of these is long data type leteral ? 0*99FFFL ABCDEFG 0*99FFFa 99671246 63. What is the value stored in x in following lines of code ? int x,y,z; x=0; y=1; x=y=z=8; 0 1 9 8 64. When does method overloading determined ? At run time At compile time At coding time At execution time 65. What is the range of short data type in java? -128 to 127 -32768 to 32767 -2147483648 to 2147483647 None of the above 66. Which of the following has a method named flush ()? Input stream Output stream Reader stream Input output stream 67. File class is included in which package ? java.io package java.lang package java.awt package java.util package 68. Arrange in sequence from lower to higher : terabyte megabyte nibble yotabyte 1,2,3,4 2,3,4,1 3,2,1,4 1,3,2,4 69. What is the default value of float variable ? 0.0d 0.0F 0 Not defined 70. Operators having same priority are evaluated from : Right to Left Left to Right Any of the order Depend on compiler 71. If a variable is declared final,it must include ____value. integer no initial float 72. In Java Program ,package declaration ______import statements. must precede must succeed may precede or succeed none suitable 73. Which of the following is not the java primitive type ? Byte Float Character Long double 74. Java Programs perform I/O Through : Streams I/O package I/O methods Compiler 75. How Many Time does the following code segment execute : int x=1,y=10,z=1; do{y-;x++;y-=2;y=;z++}while(y>1&&z<10); 1 10 5 Infinite 76. Command to execute compiled java program is : java javac run javaw 77. The new operator dynamically allocates ____for an object and return a reference to it . classes variable memory none of the above 78. Class is a ______entity. logical physical up normal collection of 79. Operator that concatenates two strings : + ++ – +- 80. ____is valid for IF statement. An integer expression A boolean expression A character expression A legal expression 81. A _____object can not be modified after it is created . double int string main 82. Which of the following denotes a javadoc comment ? //# /* /** //** 83. Which of the following is an assignment operator ? += == %= =. 84. Which of the following will produce a value of 22 if x =22.9? ceil(x) round(x) rint(x) abs(x) 85. full form of HTTP is : High Type Transfer Program Hyper Text Transfer Program Hyper Text Transfer Protocol Hyper Type Transfer Protocol 86. Consider the code segment “x=(a>b)?a:b”, then the value of x is 19,if a=19 and b=12: True Not supported False None of the above 87. Each method in a java class must have a unique name : Not necessarily True False None of the above 88. Which of the following is used to convert string to number in java program ? to number() con string() value of() to string() 89. Method overloading is one of the way that java supports___ Encapsulation Class Inheritence Polymorphism 90. What is the extension of compiled java program ? .class .java .css .html 91. 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 92. If m and n are int type variables ,what will be the result of expression m%n when m=5 and n=2? 0 1 2 none of the above 93. Java has its origin in : C programming language PERL COBOL Oak programming language 94. What would happen if “string [] args ” is not included as argument in the main method ? No error Compilation Error Program wont run Program exits 95. Which of the following is not mandatory in variable declaration ? A semicolon ? An identifier An assignment A data type 96. All java classes are derived from: java,lang.class java.util.Name java.lang.Object java.awt.Window 97. Full Form of ASP : Always synchronous print Active Server Page Active Synchronous page Active Synchronous print 98. In java ActiveX Controls can run on: Web environment All Environment Web & windows Environment Windows Environment 99. Which language is usually considered for client side scripting ? PHP ASP java Script JSP 100. Which is the container that contains Title Bar and can have Menu Bar it can have other components like button, text field etc ? Frame Panel Window Container 101. AWT is used for GUI programming : True False Both A and B None of the above Loading … Question 1 of 101