This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Distributed Java and the fly likes int cannot be dereferenced Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Distributed Java
Reply Bookmark "int cannot be dereferenced" Watch "int cannot be dereferenced" New topic
Author

int cannot be dereferenced

Tahir Mehmood
Greenhorn

Joined: Nov 04, 2011
Posts: 3


[Edit - added code tags - MB]
Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 436


Thread.getPriority() returns an int value which you have assigned to the variable 'prty'. By using prty.equals(1) you are trying to access it as a java.lang.Integer. In your case use:



Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 3862
    
    1

And welcome to The Ranch!
Tahir Mehmood
Greenhorn

Joined: Nov 04, 2011
Posts: 3
Thank you! Mathew Brown
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: int cannot be dereferenced
 
Similar Threads
overriding compareTo
Why is this not running as expected?
Comparable interface question
byte array question
.suffix and .prefix in JAVA