THIS IS FOR EDUCATION PURPOSE PURPOSE ONLY
Friday, 18 October 2019
Student Test
Online Random Test
Buy Mini Militia GOD MOD
Download Mini Militia GOD MOD
Time remaining
:
:
Test Status
COREJAVARANDOMTEST
Ques 1 :
What is the real name of Rehman. Select the one correct answer./**/
(A) Sanur
(B) ******(this is not abusive word)
(C) Culcutta se bhaga darpok
(D) Tharki
Ques 2 :
What is the result of your feelings when someone show his/her opposite face of being animal.
(A) Wants to take revenge
(B) Start to change his/her mind
(C) Try to get in his/her way
(D) Get a new experience
Ques 3 :
What is the modified name of Anku. Select the one correct answer.
(A) Human
(B) Shakal
(C) Serious na liyo
(D) Anything else you wants to hear.
Ques 4 :
Which of these statements are true. Select the two correct answers.
a.
For each try block there must be at least one catch block defined.
b.
A try block may be followed by any number of finally blocks.
c.
A try block must be followed by at least one finally or catch block.
d.
If both catch and finally blocks are defined, catch block must precede the finally block.
(A) a, b
(B) c, d
(C) b, d
(D) a, c
Ques 5 :
Which of the following are legal declaration and definition of a method. Select all correct answers.
a.
void method() {};
b.
void method(void) {};
c.
method() {};
d.
method(void) {};
e.
void method {};
(A) a,b
(B) a
(C) a,b,c
(D) b,d,e
Ques 6 :
class test
{
public static void main(String[] args)
{
Date d = new Date(2011343412345L);
DateFormat df = new DateFormat();
System.out.println(df.format(d));
}
}
What would be the result?
(A) An exception is thrown at runtime.
(B) 2011343412345L
(C) 26 Sep, 2033
(D) A compile time error.
Ques 7 :
What is the result of compiling and running the following program.
public class test {
public static void main(String args[]) {
String str1="abc";
String str2="def";
String str3=str1.concat(str2);
str1.concat(str2);
System.out.println(str1);
}
}
(A) def
(B) abc
(C) abcabc
(D) abcdef
Ques 8 :
Which of the following statements are true. Select the one correct answer.
(A) Arrays in Java are essentially objects.
(B) It is not possible to assign one array to another. Individual elements of array can however be assigned
(C) Array elements are indexed from 1 to size of array.
(D) If a method tries to access an array element beyond its range, a compile warning is generated.
Ques 9 :
The code snippet
if( "Welcome".trim() == "Welcome".trim() )
System.out.println("Equal");
else
System.out.println("Not Equal");
What will be Answer
(A) compile and display â??Equalâ??
(B) compile and display â??Not Equalâ??
(C) cause a compiler error
(D) compile and display NULL
Ques 10 :
All the wrapper classes (Integer, Boolean, Float, Short, Long, Double and Character) in java
(A) are final
(B) are private
(C) are serializable
(D) are immutatable
Ques 11 :
Which of the following statements is false about objects?
(A) An instance of a class is an object
(B) Objects can access both static and instance data
(C) Objects do not permit encapsulation
(D) Object is the super class of all other classes
Ques 12 :
A program needs to store the name, salary, and age of employees in years. Which of the following data types should be used to create the Employee class. Select the three correct answers.
a.
char
b.
boolean
c.
Boolean
d.
String
e.
int
f.
double
(A) a,d,f
(B) a,e,f
(C) d,e,f
(D) d,a,e
Ques 13 :
Which of the following are valid declarations for the main method. Select the three correct answers.
a.
public static void main(String args[]);
b.
public static void main(String []args);
c.
final static public void main (String args[]);
d.
public static int main(String args[]);
e.
public static abstract void main(String args[]);
(A) a, b, c
(B) b, d, e
(C) a, d, c
(D) a, b, e
Ques 14 :
Write down the modifier of a method that makes the method available to all classes in the same package and to all the subclasses of this class.
(A) public
(B) protected
(C) private
(D) default
Ques 15 :
5.
Which of these are interfaces in the collection framework. Select the two correct answers.
a.
Set
b.
List
c.
Array
d.
Vector
e.
LinkedList
(A) a,b,c
(B) a,b
(C) b,c,d,e
(D) c,d
Ques 16 :
Which of the following are legal array declarations. Select the three correct answers.
a.
int i[5][];
b.
int i[][];
c.
int []i[];
d.
int i[5][5];
e.
int[][] a;
(A) a, d, e
(B) b, c, d
(C) b, c, e
(D) a, c, e
Ques 17 :
Name the access modifier which when used with a method, makes it available to all the classes in the same package and to all the subclasses of the class.
(A) public
(B) private
(C) protected
(D) default
Ques 18 :
Which keyword when applied on a method indicates that only one thread should execute the method at a time. Select the one correct answer.
(A) transient
(B) volatile
(C) synchronized
(D) native
Ques 19 :
Which of the following are correct. Select the one correct answer.
(A) An import statement, if defined, must always be the first non-comment statement of the file.
(B) private members are accessible to all classes in the same package.
(C) An abstract class can be declared as final.
(D) Local variables cannot be declared as static.
Ques 20 :
What all gets printed when the following code is compiled and run.Select the three correct answers.
class test
{
public static void main(String args[])
{
int i[] = {0,1};
try
{
i[2] = i[0] + i[1];
}
catch(ArrayIndexOutOfBoundsException e1)
{
System.out.println("1");
}
catch(Exception e2)
{
System.out.println("2");
}
finally
{
System.out.println(3);
}
System.out.println("4");
}
}
a.
1
b.
2
c.
3
d.
4
(A) 1 2 4
(B) 4
(C) 1 3 4
(D) 1 2 3
">Submit Answer
Don't Refresh the Page !! ...
Newer Posts
Home
Subscribe to:
Posts (Atom)
SVIET SUPER60
Student Test
Online Random Test Buy ...