break statement is used to i) get out of method ii) end a program iii) get out of a loop iv) get out of the system
1.1 & 2
2.1,2 & 3
3.1 & 3
4.3
In the second type, the information written in java after // is ignored by the …………………..
1.Interpreter
2.Compiler
3.Programmer
4.All of the above
Java has its origin in
1.C programming language
2.PERRL
3.COBOL
4.Oak programming language
Prepared Statement object in JDBC used to execute……….. queries.
1.Executable
2.Simple
3.High level
4.Parameterized
The ………………….. looks only for a match between the value of the expression and one of its case constants.
1.if
2.match
3.switch
4.None of the above
Which method will a web browser call on a new applet?
1.main method
2.destroy method
3.execute method
4.init method
All Java classes are derived from
1. java.lang.Class
2.java.util.Name
3.java.lang.Object
4.java.awt.Window
By using ………………. you can force immediate termination of a loop, bypassing the conditional expression and any remaining code in the body of the loop.
1.Break
2.Continue
3.Terminate
4.Loop Close
Filters were officially introduced in the Servlet ……………… specification.
1.2.1
2.2.3
3.2.2
4.2.4
For the execution of DELETE SQL query in JDBC, …………. method must be used.
1.executeQuery()
2.executeDeleteQuery()
3.executeUpdate()
4.executeDelete()
In Java variables, if first increment of the variable takes place and then the assignment occurs. This operation is also called…………………………
1.pre-increment
2.post-increment
3.incrementation
4.pre incrementation
In Java, …………. can only test for equality, whereas ………… can evaluate any type of Boolean expression.
1.switch, if
2.if, switch
3.if, break
4.continue, if
In order to run JSP ……………….. is required.
1.Mail Server
2.Applet viewer
3.Java Web Server
4.Database connection
Java programs are
1.Faster than others
2.Platform independent
3.Not reusable
4.Not scalable
Java servlets are an efficient and powerful solution for creating ………….. for the web. D)
1.Dynamic content
2.Static content
3.Hardware
4.Both a and b
JSP embeds in ……………. in ………………….
1.Servlet, HTML
2.HTML, Java
3.HTML, Servlet
4.Java, HTML
Native-protocol pure Java converts ……….. into the ………… used by DBMSs directly.
1.JDBC calls, network protocol
2. ODBC class, network protocol
3.ODBC class, user call
4.JDBC calls, user call
OOP features are i) Increasing productivity ii) Reusability iii) Decreasing maintenance cost iv) High vulnerability
1. 1,2 & 4
2.1,2 & 3
3.1, 2 & 4
4.None of the above
State true or false. i) AWT is an extended version of swing ii) Paint( ) of Applet class cannot be overridden
1.i-false, ii-false B)C)
2.i-false,ii-true
3.i-true, ii-false
4.i-true, ii-true
State true or false. i) init() is called after start() in applet ii) applets are used for networking iii) inheritance is a part of Java Foundation Classes iv) final does not prevent inheritance
1.i-true, ii-true, iii-false, iv-true
2.i-false, ii-false, iii-false, iv-false
3.i-true, ii-true, iii-true, iv-true
4. i-true, ii-false, iii-false, iv-false
System.in.read() is being used, the program must specify the ……………… clause.
1.throws.java.out.IOException
2.throws.java.in.IOException
3.throws.java.io.IOException
4.throws.java.io.InException
The command javac is used to
1.debug a java program
2.compile a java program
3.interpret a java program
4. execute a java program
The compiled Java program can run on any ………………… platform having Java Virtual Machine (JVM) installed on it. A) program B) java C) hardware D) nonjava
1. program
2. java
3.hardware
4.nonjava
The jdb is used to
1.Create a jar archive
2.Debug a java program
3.Create a C header file
4.Generate java documentation
The out object is an object encapsulated inside the …………….. class and represents the standard output device.
1.standard
2.local
3.global
4.system
The third type of comment is used by a tool called ……………… for automatic generation of documentation.
1.Java commenting
2.Java generator
3.Java doc
4.Java loc
What would happen if “String[]args†is not included as an argument in the main method?
1.No error
2.Compilation error
3.The program won’t run
4.Program exit
When a programming class implements an interface, it must provide behavior for
1.two methods defined in that interface
2.any methods in a class
3.only certain methods in that interface
4.all methods defined in that interface
When the operators are having the same priority, they are evaluated from …………….. …………. in the order they appear in the expression.
1.right to left
2.left to right
3.any of the order
4.depends on the compiler
Which is the root class of all AWT events
1.java.awt.ActionEvent
2.java.awt.AWTEvent
3. java.awt.event.AWTEvent
4.java.awt.event.Event
Which of the following is not mandatory in a variable declaration?
1.a semicolon
2.an identifier
3.an assignment
4.a data type
Which one of the following is true for Java
1.Java is object-oriented and interpreted
2.Java is efficient and faster than C
3.Java is the choice of everyone.
4.Java is not robust.