Java MCQs with Answer
Java MCQs with Answer
- Java programs are
- Java has its origin in
- Which one of the following is true for Java
- The command javac is used to
- Java servlets are an efficient and powerful solution for
creating ………….. for the web. - Filters were officially introduced in the Servlet ___________ specification.
- Which is the root class of all AWT events
- OOP features are
- break statement is used to
- Native – protocol pure Java converts ______ into the ______ used by DBMSs directly.
- The JDBC-ODBC bridge allows ……….. to be used as ………..
- Which of the following is true about Java.
- _______ are not machine instructions and therefore, Java interpreter generates machine code that can be directly executed by the machine that is running the Java program.
- The command javac
- Which of the following is not the java primitive type
- Command to execute compiled java program is
- Java Servlet
- Inner classes are
- How many times does the following code segment execute/
- State weather the following statement is true or false for EJB.
- All java classes are derived from
- The jdb is used to
- What would happen if "String[]args" is not included as argument
in the main method. - For execution of DELETE SQL query in JDBC,______ method must be used.
- Which method will a web browser call on a new applet?
- Which of the following is not mandatory in variable declaration?
- When a program class implements an interface, it must
provide behavior for - In order to run JSP ……………….. is required.
- State true of false.
- Prepared Statement object in JDBC used to execute _____ queries.
- In Java variables, if first increment of the variable takes
place and then the assignment occurs. This operation is also called ______. - When the operators are having the same priority, they are
evaluated from _______ __________ in the order they appear in the expression. - In java, ________ can only test for equality, where as ________ can evaluate any type of the
Boolean expression. - The ______ looks only for a match between the value of the expression and one of its
case constants. - System.in.read() is being used, the program must specify the _______ clause.
- By using____________ you can force immediate termination of a loop,
by passing the conditional expression and any remaining code in the
body of the
loop. - The out object is an object encapsulated inside the___________
class, and represents the standard output device. - The third type of comment is used by a tool called _______ for
automatic generation of documentation. - In the second type the information written in java after // is
ignored by the ______. - The compiled java program can run on any ______ plateform having Java Virtual
Machine (JVM) installed on it. - Preparedstatement Object in JDBC is used to execute __________ queries.
- In JDBC _________imports all Java classes concerned with
database connectivity. - MS-SQL stores data in a …………………… file format.
- Ingres is a _______.
(a) Faster than others
(b) Platform independent
(c) Not reusable
(d) Not scalable
(b) Platform independent
(a) C programming language
(b) PERRL
(c) COBOL
(d) Oak programming language
(d) Oak programming language
(a) Java is object oriented and interpreted
(b) Java is efficient and faster than C
(c) Java is the choice of everyone.
(d) Java is not robust.
(a) Java is object oriented and interpreted
(a) debug a java program
(b) compile a java program
(c) interpret a java program
(d) execute a java program
(b) compile a java program
(a) Dynamic content
(b) Static content
(c) Hardware
(d) Both a and b
(a) Dynamic content
(a) 2.1
(b) 2.3
(c) 2.2
(d) 2.4
(b) 2.3
(a) java.awt.ActionEvent
(b) java.awt.AWTEvent
(c) java.awt.event.AWTEvent
(d) java.awt.event.Event
(c) java.awt.event.AWTEvent
i) Increasing productivity
ii) Reusability
iii) Decreasing maintenance cost
iv) High vulnerability
(a) 1,2 & 4
(b) 1,2 & 3
(c) 1, 2 & 4
(d) none of the above
(b) 1,2 & 3
i) get out of method
ii) end aprogram
iii) get out of a loop
iv) get out of the system
(a) 1 & 2
(b) 1,2 & 3
(c) 1 & 3
(d) 3
(d) 3
(a) JDBC calls, network protocol
(b) ODBC class, network protocol
(c) ODBC class, user call
(d) JDBC calls, user call
(a) JDBC calls, network protocol
(a) JDBC drivers, ODBC drivers
(b) Drivers, Application
(c) ODBC drivers, JDBC drivers
(d) Application, drivers
(c) ODBC drivers, JDBC drivers
(a) Java does not support overloading.
(b) Java has replaced the destructor function of C++
(c) There are no header files in Java.
(d) All of the above.
(d) All of the above
(a) Compiled Instructions
(b) Compiled code
(c) byte code
(d) Java mid code
(c) byte code
(a) Converts a java program into binary code
(b) Converts a java program into bytecode
(c) Converts a java program into machine language
(d) None of the above.
(b) Converts a java program into bytecode
(a) Byte
(b) Float
(c) Character
(d) Long double
(d) Long double
(a) java
(b) javac
(c) run
(d) javaw
(a) java
i) is key component of server side java development
ii) is a small pluggable extension to a server that enhances functionality
iii) runs only in Windows Operating System
iv) allows developers to customize any java enabled server
(a) i, ii & iii are ture
(b) i, iii & iv are true
(c) ii, iii & iv are true
(d) i, ii & iv are true
(d) i, ii & iv are true
(a) anonymous classes
(b) nested classes
(c) sub classes
(d) derived classes
(b) nested classes
int x=1, y=10, z=1;
do{
y–;
x++;
y-=2;
y=z;
z++
} while (y>1 && z<10);
(a) 1
(b) 10
(c) 5
(d) infinite
(a) 1
1. EJB exists in the middle-tier
2. EJB specifies an execution environment
3. EJB supports transaction processing
(a) 1-true, 2. true, 3. true
(b) 1- true, 2. false, 3. true
(c) 1- false, 2- false, 3- false
(d) 1-true, 2-true, 3-false
(a) 1-true, 2. true, 3. true
(a) java.lang.Class
(b) java.util.Name
(c) java.lang.Object
(d) java.awt.Window
(c) java.lang.Object
(a) Create a jar archive
(b) Debug a java program
(c) Create C header file
(d) Generate java documentation
(b) Debug a java program
(a) No error
(b) Compilation error
(c) Program won’t run
(d) Program exit
(c) Program won’t run
(a) executeQuery()
(b) executeDeleteQuery()
(c) executeUpdate()
(d) executeDelete()
(c) executeUpdate()
(a) main method
(b) destroy method
(c) execute method
(d) init method
(d) init method
(a) a semicolon
(b) an identifier
(c) an assignment
(d) a data type
(c) an assignment
(a) two methods defined in that interface
(b) any methods in a class
(c) only certain methods in that interface
(d) all methods defined in that interface
(d) all methods defined in that interface
(a) Mail Server
(b) Applet viewer
(c) Java Web Server
(d) Database connection
(c) Java Web Server
i) AWT is an extended version of swing
ii) Paint( ) of Applet class cannot be overridden
(a) i-false, ii-false
(b) i-false,ii-true
(c) i-true, ii-false
(d) i-true, ii-true
(a) i-false, ii-false
(a) Executable
(b) Simple
(c) High level
(d) Parameterized
(d) Parameterized
(a) pre increment
(b) post increment
(c) incrementation
(d) pre incrementation
(d) pre incrementation
(a) right to left
(b) left to right
(c) any of the order
(d) depends on compiler
(b) left to right
(a) switch, if
(b) if, switch
(c) if, break
(d) continue, if
a) switch, if
(a) if
(b) match
(c) switch
(d) None of the above
(c) switch
(a) throws.java.out.IOException
(b) throws.java.in.IOException
(c) throws.java.io.IOException
(d) throws.java.io.InException
(c) throws.java.io.IOException
(a) Break
(b) Continue
(c) Terminate
(d) Loop Close
(a) Break
(a) standard
(b) local
(c) globlal
(d) system
(d) system
(a) Java commenting
(b) Java generator
(c) Java doc
(d) Java loc
(c) Java doc
(a) Interpreter
(b) Compiler
(c) Programmer
(d) All of the above
(b) Compiler
(a) program
(b) java
(c) hardware
(d) non java
(b) java
(a) executable
(b) simple
(c) high level
(d) parameterized
(d) parameterized
(a) javax.sql.*
(b) java.mysql.*
(c) java.sql.*
(d) com.*
(a) javax.sql.*
(a) .DAT
(b) .MDB
(c) .MSSQL
(d) .OBJ
(a) .DAT
(a) Socket
(b) Compiler
(c) Database
(d) Web server
(c) Database
Related Topics
"Java MCQs with Answer","java mcq questions with answers pdf","advanced java mcq questions with answers pdf","java mcq questions for placement","java mcq online test","Java MCQ ","Java MCQ Questions and Answer","readmcqs.com","ReadMCQs.com"

Comments
Post a Comment