This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes About single and package Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "About single and package" Watch "About single and package" New topic

About single and package

Wesley Tai

Joined: Sep 30, 2003
Posts: 6
I have a question.
Can I use 'single' to take place with the type "float"?
~=package,do anybody use it?
Thank you.
Nicolaas van Rensburg

Joined: Jul 16, 2004
Posts: 8
As far as I know, you can use the 'single' keyword with any basic classes such as int, char, double etc. What class are you querying on?
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24193

Hey guys,

First, there's no "single" keyword. The floating-point types are "float" and "double."

Second, yes, everyone uses packages; you pretty much shouldn't write any code that's not in a package.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: About single and package
It's not a secret anymore!