Dear Friends,
These q's are from the MindQ
Test 45. Which methods does java.lang.Math include for trigonometric computations?
a) sin()
b) cos()
c) tan()
d) aSin()
e) aCos()
f) aTan()
g) toDegree()
Ans given: a,b,c
Doubt: are aSin, aCos, aTan not trigonometric computations ?
42. Which method below can change a
String object, s ?
a) equals( s )
b) substring( s )
c) concat( s )
d) toUpperCase( s )
e) none of the above will change s
Ans given:e
Doubt:What is it testing? Strings being immutable or the method calls ?
37. Which of the following statements about
Java's garbage collection are true?
a) The garbage collector can be invoked explicitly using a Runtime object.
b) The finalize method is always called before an object is garbage collected.
c) Any class that includes a finalize method should invoke its superclass' finalize method.
d) Garbage collection behavior is very predictable.
Ans given:a,b,c
Doubt: b?. finalize won't be called more than once for an object.(i.e what if it has failed once??)
Would be great if you could resolve these doubts.
Thanking in advance,
Alokesh