Which method is used to perform DML statements in JDBC
1.executeUpdate()
2.executeQuery()
3.execute()
4.None of above
After the compilation of the java source code, which file is created by the JVM
1..class
2..doc
3..java
4..cdr
All collection classes are available in
1.java.util package
2.java.io package
3.java.lang package
4.java.awt package
All raw data types should be read and uploaded to the database as an array of
1.int
2.byte
3.char
4.bollean
Automatic type conversion in Java takes place when
1.Two type are compatible and size of destination type is equal of source type.
2.Two type are compatible and size of destination type is larger than source type.
3.Two type are compatible and size of destination type is shorter than source type.
4.All of the above
Converting a primitive type data into its corresponding wrapper class object instance is called
1.boxing
2.wrapping
3.autoboxing
4.instantiation
Execution of the program is always begins with
1.Main method
2.parent class
3.default package
4.class contain main method
How many primitive data types are there in Java?
1.5
2.6
3.7
4.8
If method have same name as class name and method don't have any return type then it is known as
1.Constructor
2.Destructors
3.Variable
4.Object
In Java byte, short, int and long all of these are
1.signed
2.unsigned
3.Both of the above
4.None of these
In java, gc() method is available in which package
1.java.io package
2.java.lang package
3.java.awt package
4.java.util package
Inheritance means
1.Sub class create object of super class
2.Sub class extends Base class
3.Sub class extends super class
4.All of the above
�In Java, the word true is ................
1.A Boolean literal
2.A Java keyword
3.Same as value 0
4.Same as value 1
�What is the output for the below code ? public class Test{public static void main(String[] args){int i = 010; int j = 07;System.out.println(i); System.out.println(j); } }
1.7 8
2.8 7
3.9 8
4.None
�What will be output of following program? public class Test{public static void main(String[] args){byte b=127; b++; b++; System.out.println(b); } }
1.127
2.-127
3.129
4.-129
�Which class cannot be subclassed (or extended) in java?
1.Final class
2.abstract class
3.parent class
4.None of above
JAR file contains the compressed version of
1..java file
2..jsp file
3..class file
4.None of above
Java is a ........... language.
1.moderate typed
2.strogly typed
3.weakly typed
4.none of these
JIT meaning
1.just in time
2.java in time
3.join in time
4.none of above
Methods that have same name, but different Parameter list and different definition known as
1.Overriding
2.Overloading
3.Constructor
4.none of these
Minimum threads in a program are
1.0
2.1
3.2
4.3
Object which can store group of other objects is called
1.Package
2.Wrapper
3.Java object
4.Collection object
Package of drawstring() method is
1.java.awt
2.javax.swing
3.java.applet
4.java.io
pow () is associated with which class
1.Input stream class
2.Object class
3.Math class
4.None of above
Process of creating exact copy of the existing object is called
1.overloading
2.overriding
3.cloning
4.coping
Program which executes applet is known as
1.JVM
2.virtual machine
3.applet engine
4.None of above
Runnable is
1.Interface
2.Class
3.Variable
4.Method
Size of float and double in Java is
1.32 and 64
2.64 and 64
3.32 and 32
4.64 and 32
Size of int in Java is
1.8 bit
2.16 bit
3.32 bit
4.64 bit
String is the predefined
1.Object
2.Variable
3.Class
4.Method
Super is the predefined
1.Method
2.Keyword
3.Keyword and Method
4.None of above
Suspend thread can be revived by using
1.yield() method
2.Suspend() method
3.start() method
4.resume() method
The class java.sql.Timestamp is associated with
1.java.util.Date
2.java.util.Time
3.java.sql.Time
4.None of above
The following fraction of code double STATIC = 2.5 ; System.out.println( STATIC );
1.Prints 2.5
2.Raises an exception
3.Raises an error as STATIC is used as a variable which is a keyword
4.None of these
The following program: public class Test{ static boolean is OK; public static void main(String args[]){System.out.print(is OK); } }
1.Prints true
2.Prints false
3.Will not compile as boolean is not initialized
4.Will not compile as boolean can never be static
The JDBC-ODBC bridge is
1.Singlethreaded
2.Multithreaded
3.Both of above
4.None of above
The smallest integer type is ......... and its size is ......... bits.
1.short, 8
2.byte, 8
3.short, 16
4.short, 16
Thread class is available in
1.java.lang package
2.java.util package
3.java.awt package
4.java.io package
What will the output of the following program? public class Test{ public static void main(String args[]){float f = (1 / 4) * 10; int i = Math.round(f); System.out.println(i); } }
1.0
2.1
3.2
4.3
Which collection class associates values witch keys, and orders the keys according to their natural order
1.java.util.LinkedList
2.java.util.TreeMap
3.java.util.SortedSet
4.java.util.HashSet
Which method executes only once
1.stop() method
2.start() method
3.init() method
4.destroy() method
Which metrhods are utilized to control the access to an object in multi threaded programming
1.Synchronized methods
2.Asynchronized methods
3.Serialized methods
4.None of above
Which of the following automatic type conversion will be possible?
1.byte to int
2.short to int
3.long to int
4.int to long
Which of the following below are valid isolation levels in J2EE
1.TRANSACTION_READ_UNCOMMITTED
2.TRANSACTION_SERIALIZABLE
3.Only A
4.Both A and B
Which of the following statements about arrays is syntactically wrong
1.arrayName[] p = new arrayName[5];
2.arrayName p[][] = new arrayName[2][];
3.arrayName[] p [];
4.arrayName p[5];
Which statement is static and synchronized in JDBC API
1.getConnection()
2.executeQuery()
3.prepareCall()
4.executeUpdate()
Which type of inheritance is not supported by java
1.Single
2.Mulilevel
3.Hirarchical
4.Multiple
Why we use array as a parameter of main method
1.Can store multiple values
2.It is syntax
3.Both of above
4.None of above
x=x+1 is equivalent to
1.x++
2.++x
3.x=x-1
4.None of these