Question 17 Which of the class instance creation expressions would produce a run-time error? a. Long.parseLong("1") b. Long.parseLong("1L") c. Long.parseLong("010") d. Long.parseLong("0x10") e. Long.parseLong("1.0")
There are no class instance creation expressions in this question. If it were valueOf(String str), then probably yes.
Joined: Jul 03, 2001
I agree that no instance creation can be inferred from reading the API for Long.parseLong
SCJP2. Please Indent your code using UBB Code
Joined: May 05, 2000
I even looked at the code and there is no instance creation except for instantiation of a NumberFormatException if the String contains non-numeric data.