Java MCQ Questions for Placement


Q.  If you are inserting any value in the wrong index as shown below, 1. int a[]=new int[5]; 2. a[10]=50; it would result in ______.

a. NullPointerException
b. ArrayIndexOutOfBoundsException
c. ArithmeticException
d. NumberFormatException


ANSWER: See Answer
 
No explanation is available for this question!
MCQs:  Which is used to separate the hierarchy of the class while declaring an import statement?
Category: Placement Tests,   Published by: teswesm
MCQs:  Classes in the same package cannot access each other's package-access members.
Category: Placement Tests,   Published by: teswesm
MCQs:  Which method of string class in java is used to convert the boolean into String?
Category: Placement Tests,   Published by: teswesm
MCQs:  By overriding the toString() method of the Object class, we can return values of the object, so we don't need to write much code.
Category: Placement Tests,   Published by: teswesm
MCQs:  Which Exception occurs when a class is not found while dynamically loading a class using the class loaders?
Category: Placement Tests,   Published by: teswesm
MCQs:  JDBC RowSet is the wrapper of ResultSet,It holds tabular data like ResultSet but it is easy and flexible to use.
Category: Placement Tests,   Published by: teswesm
MCQs:  What type of servlets use these methods doGet(), doPost(),doHead, doDelete(), doTrace()?
Category: Placement Tests,   Published by: teswesm
MCQs:  Which type of ServletEngine is a server that includes built-in support for servlets?
Category: Placement Tests,   Published by: teswesm
MCQs:  Struts combines which of these in to a unified Framework?
Category: Placement Tests,   Published by: teswesm
MCQs:  We need to write the controller code self, If we change the controller code, we need to recompile the class and redeploy the application this is a disadvantage of which MVC Architecture?
Category: Placement Tests,   Published by: teswesm
MCQs:  EJB is a specification for J2EE server, not a product; Java beans may be a graphical component in IDE.
Category: Placement Tests,   Published by: teswesm
MCQs:  Which EJB container must provide an implementation of Java Naming and Directory Interface (JNDI) API to provide naming services for EJB clients and components?
Category: Placement Tests,   Published by: teswesm
MCQs:  In RMI, the objects are passed by _____.
Category: Placement Tests,   Published by: teswesm
MCQs:  RMI and EJB, provides services to access an object running in another JVM (known as remote object).
Category: Placement Tests,   Published by: teswesm
MCQs:  Which two interfaces does the javax.servlet.jsp package have?
Category: Placement Tests,   Published by: teswesm
MCQs:  In JSP Action tags which tags are used for bean development?
Category: Placement Tests,   Published by: teswesm
MCQs:  Which driver Network connection is indirect that a JDBC client makes to a middleware process that acts as a bridge to the DBMS server?
Category: Placement Tests,   Published by: teswesm
MCQs:  Which Indicates a result set that cannot be updated programmatically in concurrency?
Category: Placement Tests,   Published by: teswesm
MCQs:  The APPLET tag is used to start an applet from both an HTML document and from an applet viewer.
Category: Placement Tests,   Published by: teswesm
MCQs:  Which class is used for this Processing Method processActionEvent( )?
Category: Placement Tests,   Published by: teswesm