aspose file tools*
The moose likes Beginning Java and the fly likes Int cannot be dereferenced Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Int cannot be dereferenced" Watch "Int cannot be dereferenced" New topic
Author

Int cannot be dereferenced

Mark Kaichou
Greenhorn

Joined: Feb 13, 2012
Posts: 2
I've been spending hours and hours trying to figure what have I done wrong to no avail, I've spent a load of time online trying to figure it out but I still can't!!!
Error's at line 154 :/

fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 10916
    
  12

topTiming is declared as an int - a primitive type. Therefore, it doesn't have a length.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6



What would you expect that to mean? Primitives (byte, char, short, int, long, float, double, boolean) are not objects and do not have member variables or methods. They're just simple values. So you cannot do somePrimitive.something.
Mark Kaichou
Greenhorn

Joined: Feb 13, 2012
Posts: 2
Ahhhhh, I see, silly me, thanks for the prompt reply guys!
Lalit Mehra
Ranch Hand

Joined: Jun 08, 2010
Posts: 383

toptiming isn't an array ... you can't have length for primitive datatypes ...


http://plainoldjavaobject.blogspot.in
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Int cannot be dereferenced
 
Similar Threads
Calculating download time
how do get particular date of total time
I need help refining some code
How close am I in getting this program right?
Can't add to ArrayList within switch statement?