|
|
SCJP
Sample questions
The following questions
are sample questions for SCJP
If any queries regarding the questions or answers please mail us |
|
70)
if(0.0 == -0.0) {
System.out.println("true");
}
else{
System.out.println("false");
}
prints false
prints true
Explanation:
No Explanation available
Ans: 2 |
71)
class C {
public static void main(String[] args) {
double d1 = Math.floor(0.5);
double d2 = Math.floor(1.5);
System.out.print(d1 + "," + d2);
}}
Prints: 0.0,1.0
Prints: 0.0,2.0
Prints: 1.0,1.0
Prints: 1.0,2.0
None of the above
Explanation:
No Explanation Available
Ans: 1
72)
System.out.println("String".substring(0,4));
This statement will Print
will print "Strin"
will print "Stri"
will cause compiler error
none of the above
Explanation:
No Explanation Available
Ans: 2
73)
if("String".replace('t','T') == "String".replace('t','T'))
System.out.println("Equal");
else
System.out.println("Not Equal");
will Print Equal
will Print Not Equal
compile time error
none of the above
Explanation:
No Explanation Available
Ans: 2
74)
Which of the following classes will not allow unsynchronized read
operations by multiple threads?
Vector
TreeMap
TreeSet
HashMap
HashSet
Explanation:
No Explanation Available
Ans: 1
75)
StringBuffer objects once created can not be modified
true
false
Explanation:
No Explanation available
Ans: 2
Go To Index
|
|
|