[HD-OCP17/21-Fundamentals Pg 0, Sec. 2.3.3 - literals]

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

Moderator: admin

Post Reply
joaoclopes
Posts: 35
Joined: Mon Sep 23, 2024 4:49 pm
Contact:

[HD-OCP17/21-Fundamentals Pg 0, Sec. 2.3.3 - literals]

Post by joaoclopes »

Hello, just wanted to add here:
To make it easy to read and comprehend large numbers, Java allows underscores in numeric literals. For example, 1000000.0 can also be written as 1_000_000.0. You cannot start or end a literal with an underscore. You can use multiple underscores consecutively. You need not worry about the rules governing the usage of underscores in hexadecimal, binary, and octal number formats.
You can't also use underscores before or after the dot "." on the double or float literal.

Thanks for the amazing book!

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

Re: [HD-OCP17/21-Fundamentals Pg 0, Sec. 2.3.3 - literals]

Post by admin »

True. Should be mentioned.
thank you for your feedback!

P.S. Do mention your full name so that your feedback can be acknowledged in the book.

joaoclopes
Posts: 35
Joined: Mon Sep 23, 2024 4:49 pm
Contact:

Re: [HD-OCP17/21-Fundamentals Pg 0, Sec. 2.3.3 - literals]

Post by joaoclopes »

Thanks for the fast response!

My full name is João Carvalho Lopes.

Thanks!

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

Re: [HD-OCP17/21-Fundamentals Pg 0, Sec. 2.3.3 - literals]

Post by admin »

Great. Your name will be there in the next build.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 12 guests