MCQOPTIONS
Saved Bookmarks
This section includes 765 Mcqs, each offering curated multiple-choice questions to sharpen your Placement Tests knowledge and support exam preparation. Choose a topic below to get started.
| 151. |
Which packages are also termed as Java API Packages? |
| A. | Java System Packages |
| B. | User Defined Package |
| C. | Java Defined Packages |
| D. | None of the above |
| Answer» B. User Defined Package | |
| 152. |
Which package is used for GUI? |
| A. | java.lang |
| B. | java.awt |
| C. | java.lang.ref |
| D. | java.io |
| Answer» C. java.lang.ref | |
| 153. |
Which method causes the current thread to wait for the specified milliseconds, until the another thread notifies? (invokes notify() or notifyAll() method)? |
| A. | public final void wait(long timeout)throws InterruptedException |
| B. | protected void finalize()throws Throwable |
| C. | public final void wait(long timeout,int nanos)throws InterruptedException |
| D. | protected Object clone() throws CloneNotSupportedException |
| Answer» B. protected void finalize()throws Throwable | |
| 154. |
All Applets must import java.applet and java.awt. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 155. |
Swing is not a part of JFC (Java Foundation Classes) that is used to create GUI application |
| A. | True |
| B. | False |
| Answer» C. | |
| 156. |
Abbreviate the term HQL? |
| A. | Hibernate Queue Language |
| B. | Hibernate Query Language |
| C. | Hipher Query Language |
| D. | None of the above |
| Answer» C. Hipher Query Language | |
| 157. |
Which enables some interaction with the garbage collector? |
| A. | java.lang.ref |
| B. | java.lang |
| C. | java.lang.reflect |
| D. | java.math |
| Answer» B. java.lang | |
| 158. |
Static fields belong to the class, not instances of the class |
| A. | True |
| B. | False |
| Answer» B. False | |
| 159. |
What method Returns an enumeration of the keys which includes those keys found in the default property list? |
| A. | Enumeration keys() |
| B. | Enumeration elements() |
| C. | Enumeration propertyNames() |
| D. | Both A & B |
| Answer» D. Both A & B | |
| 160. |
What is the reason that a java program cannot directly communicate with an ODBC driver? |
| A. | ODBC written in C# language |
| B. | ODBC written in C language |
| C. | ODBC written in C++ languageNone of the above |
| D. | None of the above |
| Answer» C. ODBC written in C++ languageNone of the above | |
| 161. |
What is XML used to simplify? |
| A. | Data storage |
| B. | Data sharing |
| C. | Both A & B |
| D. | None of the above |
| Answer» D. None of the above | |
| 162. |
In HTTP Request what asks for the loopback of the request message, for testing or for troubleshooting? |
| A. | PUT |
| B. | OPTIONS |
| C. | DELETE |
| D. | TRACE |
| Answer» E. | |
| 163. |
Which method is easy for a java programmer to add a criteria? |
| A. | HCQL |
| B. | HQL |
| C. | SQL |
| D. | None of the above |
| Answer» B. HQL | |
| 164. |
In which configuration file is there a link between the View and Model components in the Web Client but you would not have to touch these settings for 99.99% of your projects? |
| A. | The struts-config.xml file |
| B. | The struts.xml file |
| C. | The web.xml file |
| D. | The struts.properties file |
| Answer» B. The struts.xml file | |
| 165. |
RMI uses which protocol on top of TCP/IP (an analogy is HTTP over TCP/IP)? |
| A. | Java Remote Method Protocol (JRMP) |
| B. | Internet Inter-ORB Protocol (IIOP) |
| C. | Jinni Extensible Remote Invocation (JERI) |
| D. | All mentioned above |
| Answer» B. Internet Inter-ORB Protocol (IIOP) | |
| 166. |
Which server-side component is required to be deployed on the server? |
| A. | EJB |
| B. | RMI |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. RMI | |
| 167. |
Give the abbrevation of BSD. |
| A. | Berkeley Software Distribution |
| B. | Berkeley Socket Distribution |
| C. | Berkeley System Distribution |
| D. | None of the above |
| Answer» B. Berkeley Socket Distribution | |
| 168. |
The DatagramSocket and DatagramPacket classes are not used for connection-less socket programming. |
| A. | True |
| B. | False |
| Answer» C. | |
| 169. |
What is used to convert the byte-oriented stream into character-oriented stream? |
| A. | Console |
| B. | Scanner |
| C. | InputStreamReader |
| D. | DataInputStream |
| Answer» D. DataInputStream | |
| 170. |
POJO means you are not forced to implement any interface or extend any class. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 171. |
Which method is used in thread class to test if the current thread has been interrupted? |
| A. | public static boolean interrupted() |
| B. | public boolean isInterrupted() |
| C. | public void interrupt() |
| D. | public boolean isAlive() |
| Answer» B. public boolean isInterrupted() | |
| 172. |
Which method of the Naming class (found in java.rmi) is used to update the RMI registry on the server machine? |
| A. | rebind () |
| B. | lookup() |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. lookup() | |
| 173. |
How many types of session beans are available in EJB? |
| A. | 2 |
| B. | 3 |
| C. | 4 |
| D. | 5 |
| Answer» C. 4 | |
| 174. |
A leading database connectivity vendor, worked together to produce the ____. |
| A. | JDBC-ODBC Bridge |
| B. | JDBC Driver Test Suite |
| C. | Both A & B |
| D. | None of the above |
| Answer» D. None of the above | |
| 175. |
Which allows you to migrate your implementations over time without breaking the code that depends on the public interface of your classes? |
| A. | Polymorphism |
| B. | Inheritance |
| C. | Encapsulation |
| D. | Both A & B |
| Answer» D. Both A & B | |
| 176. |
Which method is first Called for any applet when it starts its execution? |
| A. | void init() |
| B. | void destroy() |
| C. | boolean isActive() |
| D. | None of the above |
| Answer» B. void destroy() | |
| 177. |
Which class cannot be instantiated? |
| A. | Abstract Class |
| B. | Static Class |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. Static Class | |
| 178. |
Which method cannot be overridden? |
| A. | Final Method |
| B. | Final class |
| C. | Final Variable |
| D. | Both A & C |
| Answer» B. Final class | |
| 179. |
What is the built on top of the socket programming? |
| A. | EJB |
| B. | RMI |
| C. | Both A & B |
| D. | None of the above |
| Answer» C. Both A & B | |
| 180. |
Which models do the JDBC API support for the database access? |
| A. | Two-tier models |
| B. | Three-tier models |
| C. | Both A & B |
| D. | None of the above |
| Answer» D. None of the above | |
| 181. |
Which method compares the given object to 'this' object? |
| A. | public boolean equals(Object obj) |
| B. | public final void notifyAll() |
| C. | public final void notify() |
| D. | public final ClassgetClass() |
| Answer» B. public final void notifyAll() | |
| 182. |
Which applet java.awt.component class provides the life cycle method? |
| A. | public void paint(Graphics g) |
| B. | public void destroy() |
| C. | public void stop() |
| D. | public void init() |
| Answer» B. public void destroy() | |
| 183. |
Which package acts as an object -oriented wrapper around most common databases provided by java? |
| A. | JDBC |
| B. | ODBC |
| C. | None of the above |
| D. | None of these |
| Answer» B. ODBC | |
| 184. |
Where can the event handling code be written? |
| A. | Same class |
| B. | Other class |
| C. | Anonymous class |
| D. | All mentioned above |
| Answer» E. | |
| 185. |
Which concept is used to make Java more memory efficient (because no new objects are created if it exists already in string constant pool)? |
| A. | String literal |
| B. | By new keyword |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. By new keyword | |
| 186. |
Which method in session tracking is used in a bit of information that is sent by a web server to a browser and which can later be read back from that browser? |
| A. | HttpSession |
| B. | URL rewriting |
| C. | Cookies |
| D. | Hidden form fields |
| Answer» D. Hidden form fields | |
| 187. |
Exception Handling is a mechanism to handle runtime errors |
| A. | True |
| B. | False |
| Answer» B. False | |
| 188. |
If a class has multiple methods by same name but different parameters, it is known as? |
| A. | Constructor overloading |
| B. | Method overloading |
| C. | Operator overloading |
| D. | None of these |
| Answer» C. Operator overloading | |
| 189. |
Which of the following JDBC drivers is known as a partially java driver? |
| A. | JDBC-ODBC bridge driver |
| B. | Native-API driver |
| C. | Network Protocol driver |
| D. | Thin driver |
| Answer» C. Network Protocol driver | |
| 190. |
Local inner class can access non-final local variable |
| A. | True |
| B. | False |
| Answer» C. | |
| 191. |
Which is invoked after the init() method or browser is maximized? |
| A. | public void start() |
| B. | public void paint(Graphics g) |
| C. | Public void stop() |
| D. | Public void init() |
| Answer» B. public void paint(Graphics g) | |
| 192. |
Which class provides many methods for graphics programming? |
| A. | java.awt |
| B. | java.Graphics |
| C. | java.awt.Graphics |
| D. | None of the above |
| Answer» D. None of the above | |
| 193. |
StringTokenizer implements the Enumeration interface |
| A. | True |
| B. | False |
| Answer» B. False | |
| 194. |
What does the java.net.InetAddress class represent? |
| A. | Socket |
| B. | IP Address |
| C. | Protocol |
| D. | MAC Address |
| Answer» C. Protocol | |
| 195. |
In java, Method Overloading is possible by changing the return type of the method |
| A. | True |
| B. | False |
| Answer» C. | |
| 196. |
Garbage collection only occurs sporadically during the execution of your program |
| A. | True |
| B. | False |
| Answer» B. False | |
| 197. |
Which driver uses ODBC driver to connect to the database? |
| A. | JDBC-ODBC bridge driver |
| B. | Native - API driver |
| C. | Network Protocol driver |
| D. | Thin driver |
| Answer» B. Native - API driver | |
| 198. |
In HTTP Request method Get request is secured because data is exposed in URL bar |
| A. | True |
| B. | False |
| Answer» C. | |
| 199. |
The struts 2 framework is used to develop MVC-based web application |
| A. | True |
| B. | False |
| Answer» B. False | |
| 200. |
Hibernate is an? |
| A. | Open Source |
| B. | Lightweight |
| C. | ORM |
| D. | All mentioned above |
| Answer» E. | |