This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!See this thread for details.
Big Moose Saloon
 Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies Register / Login Win a copy of Refactoring for Software Design Smells: Managing Technical Debt this week in the OO, Patterns, UML and Refactoring forum!

# floating point literals

Mansi Vyas
Greenhorn

Joined: Jul 01, 2003
Posts: 27
Do we need to be familiar with exponent notation for the exam?
e.g. float f = 43e1;
dennis zined
Ranch Hand

Joined: Mar 07, 2003
Posts: 330
Yes, I would think so. Its not that difficult though.
Your example, by the way, should be:
e.g. float f = 43e1f;
floating-point numbers are double by default, so you need to indicate its float to assign it to a float variable.

SCJP 1.4<br />SCWCD 1.4
Derek Baker
Ranch Hand

Joined: May 23, 2003
Posts: 46
I should probably know this, but what does 43e1 represent? 43^1? 43*10^1? Something like that, I think.
dennis zined
Ranch Hand

Joined: Mar 07, 2003
Posts: 330
Actually its 43 * 10 expressed in floating-point type numeral. '^' is the bitwise/logical exclusive OR.
Derek Baker
Ranch Hand

Joined: May 23, 2003
Posts: 46
Sorry, shouldn't have used that symbol. So that's 43 * (10 to the first power)?

I agree. Here's the link: http://aspose.com/file-tools

subject: floating point literals