New Year Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

GIAC Secure Software Programmer – Java GSSP-Java Question # 40 Topic 5 Discussion

GIAC Secure Software Programmer – Java GSSP-Java Question # 40 Topic 5 Discussion

GSSP-Java Exam Topic 5 Question 40 Discussion:
Question #: 40
Topic #: 5

John works as a Programmer for Technostar Inc. He writes the following code using Java.

1. class WrapperClass{

2. public static void main(String[] argv){

3. String str2 = Double.toString(12);

4. String str1 = Double.toHexString(12);

5. System.out.println(str1+str2);

6. }

7. }

What will happen when John attempts to compile and execute the code?


A.

It will not compile because the Double class does not contain the toHexString() method.


B.

It will compile and execute successfully and will display 8p312 as the output.


C.

It will compile and execute successfully and will display 0x1.8p312.0 as the output.


D.

It will not compile because the Double class does not contain the toString() method.


Get Premium GSSP-Java Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.