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.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes One doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "One doubt" Watch "One doubt" New topic

One doubt

Rajeswari Kumar

Joined: Mar 23, 2007
Posts: 26
This is a question from whizlabs.

class AutoBox2 {
public static void main(String []ar) {
Float F=new Float(9.0);
float f=(float)9.0;
When I am trying to compile the program, following error has come float cannot be dereferenced
1 error
What is called dereferencing. But if it is given as
code compiles fine. Please explain me.
anil kumar
Ranch Hand

Joined: Feb 23, 2007
Posts: 447

Here f is primitive.How can you call a method on primitive variable ?


Anil Kumar
Rajeswari Kumar

Joined: Mar 23, 2007
Posts: 26
Yes Yes. Thanku. It didn't strike for me.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: One doubt
jQuery in Action, 3rd edition