MOCK TEST-2, Q:-3

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
ashishrai.kv
Posts: 33
Joined: Tue Jan 09, 2018 2:12 am
Contact:

MOCK TEST-2, Q:-3

Post by ashishrai.kv »

Q:-float d = 0 * 1.5;

why above is not float but its double as i know both have only difference in respect to the storage value?

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: MOCK TEST-2, Q:-3

Post by admin »

This is because of numeric promotion. Go through this thread to learn more: https://stackoverflow.com/questions/576 ... -promotion
If you like our products and services, please help us by posting your review here.

ashishrai.kv
Posts: 33
Joined: Tue Jan 09, 2018 2:12 am
Contact:

Re: MOCK TEST-2, Q:-3

Post by ashishrai.kv »

thanks :)

Post Reply

Who is online

Users browsing this forum: No registered users and 47 guests