Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

int cannot be dereferenced

 
Tahir Mehmood
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


[Edit - added code tags - MB]
 
Rajkamal Pillai
Ranch Hand
Posts: 445
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 4565
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to The Ranch!
 
Tahir Mehmood
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you! Mathew Brown
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic