Search This Blog

Tuesday, February 8, 2011

SCJP 6 Question 24:

Consider the following code statement.

Float f = new Float(3.14);

Choose one answer
a. f.parseFloat("2.718")
b. f.valueOf("3.1421")
c. f.byteValue()
d. f.setValue(Math.PI)
e. None of these




Answer: D.

This is a very trivial question. Based on the method names one should able to identify the operations that are performed on that object.

SCJP 6 Question 24:SocialTwist Tell-a-Friend

1 comment: