JAVA 2016 B.A/B.Com/B.SC 24 Apr,2021 boomtecho2@gmail.comLeave a comment 1. What will be printed ? public class c { public static void main(string []args) { int i=1; if(i) System.out.println(i); }} 1 i 0 Compilation Error 2. Java Supports is /are : Both A and B are incorrect pass by reference Both A and B are correct Pass by value 3. No. of bytes needed to store a variable of data type double is : Operating system dependent size java virtual machine dependent size Compiler dependent size 8 bytes 4. In Java Program , main method is : Optional Essential None of the above is correct Absent 5. Object Oriented Programming Is related to : Abstraction Encapsulation All of the Above Inheritance 6. Active X documents technology is also called : DocObject Both A and B are Correct Both A and B are inCorrect DocObj 7. Elements of an array have same : data type Both A and B Are correct scope Both A and B Are incorrect 8. A java subclass can be defined using this keyword: Private Static Public Extends 9. Server Side VB script is used for : ActiveX Controls CGI related services All of the Above Connection to database 10. IIS(Internet Information Server ) is basically a : SQL server SQL client Web Server Web Client 11. Which is /are java Token ? All of the above Punctuators Constants Keywords 12. What is the output of these lines? m=m+n; n=m-n; m=m+n; Both A and B are correct hange the values of m and n They keep m and n changed Both A and B are incorrect 13. A Push Button this kind of apperance : Three Dimensional none of the above Two Dimensional One Dimensional 14. What is output of this program ? String abc []; abc =new String[3]; System.out.println(abc[1]); Null garbage Void character zero 15. This is not a primitive data type : double String None of these Byte 16. Is it true That a class is a subclass of itself ? Sometime true Always True Some time False Always False 17. The name of package having AWT classess and interfaces is : java.awt.* java.awt.package java.*.awt javaawt 18. Does a class inherit the constructors of its superclass ? can not be known Sometime no never Sometime yes 19. A private variable can be accessed by this only : No class can access private variables The class outside of its declaring class The Class in which it is declared By main Method 20. This Class is at Top Of AWT event Hierarchy java.awt.awtevent ful java.awt.event none of the above Java.awt.AWT Event 21. Active x scripting engine is basically a : Active document Java object HTTP server OLE COM object 22. Which statement is invalid ? String abc1=”xyz”; String abc2=new string(“xyz”); String abc3=new string(); Third Second First None of these 23. In Java , null is a /an : Object None of A and B are Correct Pointer Both A and B are correct 24. Every java statement must have a : variable object class semicolon 25. This access modifier is used for encapsulation : Public private const new 26. Which operator (s) acts/act on integer operands only : Both A and B are incorrect Both A and B are correct >> << 27. String are always used using : Square brackets Double quotes Round Brackets Single Quotes 28. Active Server pages is a technology for : Microsoft Office on Internet HTML Pages on Internet All of the above Database Access On Internet 29. This is not an Active X control None of above OLE controls Java Applet with COM support Java Virtual Machine 30. The Valid Identifier is : main $xyz — none of these 31. The Component(s) of AWT is /are : Event Handlers Both A and B are correct Both A and B are incorrect Graphics user interface 32. This class extended by all other classes: New class Object Class Main class This class 33. Java uses these stages for program execution : Execution and then Interpretation Interpretation and then Compilation Compilation and then Interpretation Execution and then Compilation 34. Web Technology has no meaning without this : HTTP SQL PERL JAVA 35. This is not an Active X technology : Active Movie Active X hyperlinks Java server pages Active X server Extensions 36. The Return type of constructor is : void none of these final Int 37. Which statement does nothing ? All of the Above Null ; 1; ; 38. Java Identifier name must not have : ; * All of the above , 39. Active X controls can be created using : C All of the above C++ java 40. Choose the correct statement related to this program : public class a { public static void main ( String []args) { int i; System.out.println(i); }} Runtime Error Interpretation Error No Error Compilation Error 41. “abc” is : string constant character constant String variable Numeric constant 42. For panel, an applet is a : Sub class Super class Peer class Method 43. What will this code print ? public class print { public static void main(String []args) { int i=0111; System.out.println(i); }} 111 Both A and B are correct Both A and B are incorrect 0111 44. The Correct Statement is : String String String string abc None of the above String abc 45. An Active Document is one which can be opened in : Media player Internet browser All of the Above RDBMS 46. The range of value for data type ‘byte’ is : -127 to +127 -128 to +128 none of the above -128 to +127 47. This kind of variable can not be modified : None of these Final Private Public 48. full form of COM is : Component Object Model Cluster Object Model Classified OLE Model Classified Object Model 49. Event Model of Programming contains : Both A and B Are Correct Source Both A and B Are Incorrect Listener 50. What is the output of this code ? public class abc{ public static void main(String []args) { int x=57,y=5,z=2; System.out.println(x/y/z); } } 142.5 5 5.7 22.8 51. In COM, the role of Marshaling is To enable objects to be used on network To disable Objects running in any program To enable objects to be used by any program To terminate Object Model 52. Active X controls are extension of : Java Javascript HTML OLE 53. Java language is : Case sensitive Both A and B are correct Both A and B incorrect weakly typed 54. Which is /are not java Keyword /Keywords? Int Java Main All of the above 55. Which is not wrong statement in java ? final int abc; All of the above static int abc ; long abc ; 56. Every variable must be declared with : its value Its Initial value Its data type Its garbage value 57. Which is a wrong statement ? None of the above Java interpreter converts byte code to code to executable program Java C converts java file to byte code Byte Code is platform independent 58. The full form of URL is : Uniform resource locator Universal resource locator United resource layer United resource locator 59. A program may have the number of class definitions equal to : One Any number Zero Any Number of classes of equal to number of variables used 60. This scripting language can not be used for scripting activeX : Perl SQL Java script Visual Basic 61. What is Output of these lines : if(a>b) system.out.println(“yes”); system.out.println(“Sure”); else system.out.println(“No”); Depends on value of a and b Compilation Error Runtime Error None of the above 62. Web Technology do not include this: XML HTML SQL HTTP 63. These are independents of any particular object of a class : Dynamic Data members Both A and B are Correct Both A and B are InCorrect Static data member 64. String is : Object Class Method Constant 65. String class is mostly used to display: Messages Single digit None of the above Single character 66. Which Syntax is correct : [int ] [data]; int [] data ; data[int]; All of the above 67. System.out.print implies that : Out is static Out is public All of the above are correct print is public 68. Primitive data type are also called: User define Data type In Built Data Types Both A and B are correct Both A and B are Incorrect 69. The value of variable in a java program , can : Never be chanaged Be changed any number of times be changed only once be changed only twice 70. The Keyword refer to current object is : current This static new 71. If there is any error in a program, while java c is being used , the error may be of type : Compilation error none of A and B are correct Interpretation error Both A nad B are correct 72. ‘a’ is : Character Constant String constant Numeric Constant String 73. AWT means Abstract Window Technology Abstract Window Tasks Abstract Window Techniques Abstract Window Toolkit 74. Active X server framework uses ISAPI filter for : Client generation Encryption Animation Conferencing 75. A Static method can access: only static methods of same class Non static methods of same class Both A and B are incorrect Both A and B are correct 76. Java language is : Both A and B are Incorrect strongly typed case sensitive Both A and B are correct 77. Which is a wrong statement ? Byte code is platform Independent None of above java Interpreter converts byte code to executable program Java C converts java files to byte code 78. This is valid method declaration : Substract (int a ,b) Substract ( a , b) Int substract (int a , b) Int substract (int a , int b) 79. Which statement is wrong ? API package contain standard classes Package is a collection of classes Class is a collection of packages Packages can be user defined 80. Java Compiler generates: Both A and B are incorrect Assembly language Java file Both A and B are correct 81. An Object having a sequence of character is a : String Vector 2-D Array Array 82. What will these statement print ? int i =10; system.out.print(i++ + ++i); 23 22 20 21 83. Subclass is also called as : Friend class base class child class super class 84. Package is an : Method Identifier Keyword Class 85. The Subclass of window are : GUI Frame Pixel None of above 86. Runtime is also called : static Both A and B are incorrect Dynamic Both A and B are correct 87. The statement System.out.println((double)15/4); prints: 3.0 System error 3.75 3 88. Which method neither takes a parameter nor returns any value ? constructor All of the above finalize catch 89. variable must be declared : Anytime Never Before their use After theire use 90. What is output for this code ? public class test{ public static void main(String []args) { int i=10; { int i=20; System.out.println(“i”); }}} 10 Runtime Error Compilation Error 20 91. If i=1 and i<=10, what shuld be while loop to print ‘a’ 10 times ? While (i<=10) system.out.println('a'); While (i<=10) system.out.println(a'); While (i<=10) system.out.println('a') While (i<=10), system.out.println('a'); 92. Which statement is incorrect about abstract classes ? we can not create an object of this class none of these An Abstract method can be implemented No static method can be abstract 93. An Identifier can not start with : All of the above Digit Dollar sign Underscore Loading … Question 1 of 93