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.
| 401. |
Which methods are provided by the PrintStream class? |
| A. | Read data to another stream |
| B. | Write data to another stream |
| C. | Read data to same stream |
| D. | Write data to same stream |
| Answer» C. Read data to same stream | |
| 402. |
Which is used to store data and partial results, as well as to perform dynamic linking, return values for methods, and dispatch exceptions? |
| A. | Window |
| B. | Panel |
| C. | Frame |
| D. | Container |
| Answer» D. Container | |
| 403. |
Daemon thread provides services to user threads for background supporting tasks,It has no role in life than to serve user threads. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 404. |
Which methods are used to bind the objects on HttpSession instance and get the objects? |
| A. | setAttribute |
| B. | getAttribute |
| C. | Both A & B |
| D. | None of the above |
| Answer» D. None of the above | |
| 405. |
Which of these ways used to communicate from an applet to servlet? |
| A. | RMI Communication |
| B. | HTTP Communication |
| C. | Socket Communication |
| D. | All mentioned above |
| Answer» E. | |
| 406. |
Which is used to make asynchronous request i.e. it doesn't block the user and it sends only required field data to the server side not all, So it makes the performance fast? |
| A. | AJAX Support |
| B. | Integration Support |
| C. | Various Tag Support |
| D. | Theme and Template Support |
| Answer» B. Integration Support | |
| 407. |
Which methods returns a stream that simply provides the raw bytes from the database without any conversion? |
| A. | getCharacterStream |
| B. | getBinaryStream |
| C. | getAsciiStream |
| D. | getUnicodeStream |
| Answer» C. getAsciiStream | |
| 408. |
The ASP and JSP technologies are quite similar in the way they support the creation of Dynamic pages, using HTML templates, scripting code and components for business logic. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 409. |
Applet works at client side so less response time. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 410. |
The intent is for JDBC drivers to implement nonscrollable result sets using the support provided by the underlying database systems. |
| A. | True |
| B. | False |
| Answer» C. | |
| 411. |
Which object can be constructed to show any number of choices in the visible window? |
| A. | Labels |
| B. | Choice |
| C. | List |
| D. | Checkbox |
| Answer» D. Checkbox | |
| 412. |
From the following statements which is a drawback for Applet? |
| A. | It works at client side so less response time |
| B. | Secured |
| C. | It can be executed by browsers running under many platforms, including Linux, Windows, and Mac Os etc. |
| D. | Plugin is required at client browser to execute applet |
| Answer» E. | |
| 413. |
In Graphics class which method is used to draws a rectangle with the specified width and height? |
| A. | public void drawRect(int x, int y, int width, int height) |
| B. | public abstract void fillRect(int x, int y, int width, int height) |
| C. | public abstract void drawLine(int x1, int y1, int x2, int y2) |
| D. | public abstract void drawOval(int x, int y, int width, int height) |
| Answer» B. public abstract void fillRect(int x, int y, int width, int height) | |
| 414. |
Which mechanism is used when a thread is paused running in its critical section and another thread is allowed to enter (or lock) in the same critical section to be executed? |
| A. | Inter-thread communication |
| B. | Initial-thread communication |
| C. | Mutual Exclusive |
| D. | None of the above |
| Answer» B. Initial-thread communication | |
| 415. |
How many reserved keywords are currently defined in the Java language? |
| A. | 48 |
| B. | 49 |
| C. | 50 |
| D. | 47 |
| Answer» C. 50 | |
| 416. |
The sendRedirect() method of HttpServletResponse interface can be used to redirect response to another resource, it may be servlet, jsp or html file. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 417. |
Using mail API we cannot send mail from a servlet. |
| A. | True |
| B. | False |
| Answer» C. | |
| 418. |
Which class provides stream to read binary data such as image etc. from the request object? |
| A. | ServltInputStream |
| B. | ServletOutputStream |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. ServletOutputStream | |
| 419. |
Which validates the given string with the specified regular expression,it can be used in password, security key etc.? |
| A. | Regex Validation |
| B. | Url Validation |
| C. | Email Validation |
| D. | RequiredString Validator |
| Answer» B. Url Validation | |
| 420. |
Abbreviate the term OGNL? |
| A. | Object-Goal Navigation Language |
| B. | Object- Graph Navigation Language |
| C. | Oriented-Graph Navigation Language |
| D. | None of the above |
| Answer» C. Oriented-Graph Navigation Language | |
| 421. |
Which type of validation we must implement the Validateable interface (or extend ActionSupport class) and provide the implementation of validate method? |
| A. | By Input Validation |
| B. | By Ajax Validation |
| C. | By Custom Validation |
| D. | None of the above |
| Answer» D. None of the above | |
| 422. |
Which object of HttpSession can be used to view and manipulate information about a session? |
| A. | session identifier |
| B. | creation time |
| C. | last accessed time |
| D. | All mentioned above |
| Answer» E. | |
| 423. |
Which method is used for retrieving streams of both ASCII and Unicode characters is new in the JDBC 2.0 core API? |
| A. | getCharacterStream |
| B. | getBinaryStream |
| C. | getAsciiStream |
| D. | getUnicodeStream |
| Answer» B. getBinaryStream | |
| 424. |
Which JDBC type represents a "single precision" floating point number that supports seven digits of mantissa? |
| A. | REAL |
| B. | DOUBLE |
| C. | FLOAT |
| D. | INTEGER |
| Answer» B. DOUBLE | |
| 425. |
Which are the common security restrictions in applets? |
| A. | Applets can't load libraries or define native methods |
| B. | An applet can't read every system property |
| C. | Applets can play sounds |
| D. | Both A & B |
| Answer» E. | |
| 426. |
The JDBC API has always supported persistent storage of objects defined in the Java programming language through the methods getObject and setObject. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 427. |
Which is the container that doesn't contain title bar and MenuBars but it can have other components like button, textfield etc? |
| A. | Window |
| B. | Frame |
| C. | Panel |
| D. | Container |
| Answer» D. Container | |
| 428. |
An applet can play an audio file represented by the AudioClip interface in the java, applet package Causes the audio clip to replay continually in which method? |
| A. | public void play() |
| B. | public void loop() |
| C. | public void stop() |
| D. | None of the above |
| Answer» C. public void stop() | |
| 429. |
In Servlet Terminology what provides runtime environment for JavaEE (j2ee) applications. It performs many operations that are given below: 1. Life Cycle Management 2. Multithreaded support 3. Object Pooling 4. Security etc. |
| A. | Server |
| B. | Webserver |
| C. | Container |
| D. | Application Server |
| Answer» D. Application Server | |
| 430. |
These two ways are used to create a Frame (1) By creating the object of Frame class (association) (2) By extending Frame class (inheritance) |
| A. | True |
| B. | False |
| Answer» B. False | |
| 431. |
Implement the Listener interface and overrides its methods is required to perform in event handling. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 432. |
Unchecked exceptions are checked at compile-time rather they are checked at runtime. |
| A. | True |
| B. | False |
| Answer» C. | |
| 433. |
Struts supports which of these model components? |
| A. | JavaBeans |
| B. | EJB |
| C. | CORBA |
| D. | JDO |
| E. | All Mentioned above |
| Answer» F. | |
| 434. |
Abbreviate the term POJO? |
| A. | Plain Old Java Object |
| B. | Performance Old Java Object |
| C. | Performance Optimize Java Object |
| D. | None of the above |
| Answer» B. Performance Old Java Object | |
| 435. |
From the following statements which is a disadvantage of an java array? |
| A. | An array can hold primitive types data |
| B. | An array has its size that is known as array length |
| C. | An array knows only its type that it contains. Array type is checked at the compile-time |
| D. | An array holds only one type of data |
| Answer» E. | |
| 436. |
Which method returns the interrupted flag after that it sets the flag to false if it is true? |
| A. | isInterrupted() |
| B. | static interrupted() |
| C. | non static interrupted() |
| D. | Both A & C |
| Answer» C. non static interrupted() | |
| 437. |
The PipedInputStream and PipedOutputStream classes can be used to read and write data simultaneously. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 438. |
Where are the following four methods commonly used? 1) public void add(Component c) 2) public void setSize(int width,int height) 3) public void setLayout(LayoutManager m) 4) public void setVisible(boolean) |
| A. | Graphics class |
| B. | Component class |
| C. | Both A & B |
| D. | None of the above |
| Answer» C. Both A & B | |
| 439. |
Which method when implemented must return true while there are still more elements to extract, and false when all the elements have been enumerated? |
| A. | Object nextElement( ) |
| B. | boolean hasMoreElements( ) |
| C. | Both A & B |
| D. | None of the above |
| Answer» C. Both A & B | |
| 440. |
Which of the following ways specify/ies to load the class files in temporary? |
| A. | By setting the classpath in the command prompt |
| B. | By classpath switch |
| C. | Both A & B |
| D. | None of the above |
| Answer» D. None of the above | |
| 441. |
Which of the package is used to enable interaction with garbage collector? |
| A. | java.lang.ref |
| B. | java.lang.reflect |
| C. | java.lang |
| D. | java.awt |
| Answer» B. java.lang.reflect | |
| 442. |
Which of these simplifies an Object Relational Mapping tool? |
| A. | Data creation |
| B. | Data manipulation |
| C. | Data access |
| D. | All mentioned above |
| Answer» E. | |
| 443. |
Which one of the following scopes does the attribute in servlet is an object that can be set, get or removed? |
| A. | session scope |
| B. | request scope |
| C. | application scope |
| D. | All mentioned above |
| Answer» E. | |
| 444. |
Which package is used for analyzing code during run time? |
| A. | java.lang.reflect |
| B. | java.awt |
| C. | java.io |
| D. | java.applet |
| Answer» B. java.awt | |
| 445. |
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 | |
| 446. |
Which package is used for GUI? |
| A. | java.lang |
| B. | java.awt |
| C. | java.lang.ref |
| D. | java.io |
| Answer» C. java.lang.ref | |
| 447. |
Which package includes StringTokenizer that tokenizes a string into independent words? |
| A. | java.awt |
| B. | java.applet |
| C. | java.util |
| D. | java.lang |
| Answer» D. java.lang | |
| 448. |
Which package includes all the standard classes of java? |
| A. | java.lang |
| B. | java.math |
| C. | java.ref |
| D. | java.util |
| Answer» B. java.math | |
| 449. |
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 | |
| 450. |
Which package provides core functionality? |
| A. | java.net |
| B. | java.rmi |
| C. | java.lang |
| D. | java.math |
| Answer» D. java.math | |