Java - 16

1)   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  Explanation 

ANSWER: Write data to another stream

Explanation:
No explanation is available for this question!


2)   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  Explanation 

ANSWER: True

Explanation:
No explanation is available for this question!


3)   A package can be renamed without renaming the directory in which the classes are stored.

a. True
b. False


Answer  Explanation 

ANSWER: False

Explanation:
No explanation is available for this question!


4)   What is known as the classes that extend Throwable class except RuntimeException and Error?

a. Checked Exception
b. Unchecked Exception
c. Error
d. None of the above
Answer  Explanation 

ANSWER: Checked Exception

Explanation:
No explanation is available for this question!


5)   Which is irrecoverable?

a. Error
b. Checked Exception
c. Unchecked Exception
d. Both B & C
Answer  Explanation 

ANSWER: Error

Explanation:
No explanation is available for this question!


6)   Java application uses an output stream to read data from a source, it may be a file, an array, peripheral device or socket.

a. True
b. False


Answer  Explanation 

ANSWER: False

Explanation:
No explanation is available for this question!


7)   Mutual exclusive and inter-thread communication are which type of Synchorization?

a. Thread Synchronization
b. Process Synchronization
c. Object Synchronization
d. None of the above
Answer  Explanation 

ANSWER: Thread Synchronization

Explanation:
No explanation is available for this question!


8)   Which method is used to establish the connection with the specified url in a Driver Manager class?

a. public static void registerDriver(Driver driver)
b. public static void deregisterDriver(Driver driver)
c. public static Connection getConnection(String url)
d. public static Connection getConnection(String url,String userName,String password)
Answer  Explanation 

ANSWER: public static Connection getConnection(String url)

Explanation:
No explanation is available for this question!


9)   The ACID properties does not describes the transaction management well.

a. True
b. False


Answer  Explanation 

ANSWER: False

Explanation:
No explanation is available for this question!


10)   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  Explanation 

ANSWER: Both A & B

Explanation:
No explanation is available for this question!


11)   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  Explanation 

ANSWER: All mentioned above

Explanation:
No explanation is available for this question!


12)   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  Explanation 

ANSWER: AJAX Support

Explanation:
No explanation is available for this question!


13)   Which session bean maintain their state between client invocations but are not required to maintain their state across server crashes or shutdowns?

a. Stateful Session Bean
b. Stateless Session Bean
c. Singleton Session Bean
d. None of the above
Answer  Explanation 

ANSWER: Singleton Session Bean

Explanation:
No explanation is available for this question!


14)   JMS is mainly used to send and receive message from one application to another.

a. True
b. False


Answer  Explanation 

ANSWER: True

Explanation:
No explanation is available for this question!


15)   Which can generate HTML dynamically on the client but can hardly interact with the web server to perform complex tasks like database access and image processing etc. in JSP?

a. vs.Static HTML
b. vs.Server-Side Includes
c. vs.Pure Servlets
d. Vs.JavaScript
Answer  Explanation 

ANSWER: Vs.JavaScript

Explanation:
No explanation is available for this question!


16)   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  Explanation 

ANSWER: True

Explanation:
No explanation is available for this question!


17)   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  Explanation 

ANSWER: getBinaryStream

Explanation:
No explanation is available for this question!


18)   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  Explanation 

ANSWER: False

Explanation:
No explanation is available for this question!


19)   Applet works at client side so less response time.

a. True
b. False


Answer  Explanation 

ANSWER: True

Explanation:
No explanation is available for this question!


20)   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  Explanation 

ANSWER: Plugin is required at client browser to execute applet

Explanation:
No explanation is available for this question!


21)   Which object can be constructed to show any number of choices in the visible window?

a. Labels
b. Choice
c. List
d. Checkbox
Answer  Explanation 

ANSWER: List

Explanation:
No explanation is available for this question!


22)   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  Explanation 

ANSWER: public void drawRect(int x, int y, int width, int height)

Explanation:
No explanation is available for this question!


23)   The Java Foundation Classes (JFC) is a set of GUI components which simplify the development of desktop applications.

a. True
b. False


Answer  Explanation 

ANSWER: True

Explanation:
No explanation is available for this question!


24)   Which method is used to set the graphics current color to the specified color in the graphics class?

a. public abstract void setFont(Font font)
b. public abstract void setColor(Color c)
c. public abstract void drawString(String str, int x, int y)
d. None of the above
Answer  Explanation 

ANSWER: public abstract void setColor(Color c)

Explanation:
No explanation is available for this question!


25)   Give the abbreviation of AWT?

a. Applet Windowing Toolkit
b. Abstract Windowing Toolkit
c. Absolute Windowing Toolkit
d. None of the above
Answer  Explanation 

ANSWER: Abstract Windowing Toolkit

Explanation:
No explanation is available for this question!