Machine-translated by Google. Questions are authored in English.
Top

Discussion

What type does Thread.MIN_PRIORITY have?

  • A.int
  • B.Thread.Priority
  • C.short
  • D.Integer

Answer: A

The three priority constants are plain int fields on Thread, declared static and final. There is no priority enum in the API, which is why setPriority takes an int and will reject a value outside the permitted range with IllegalArgumentException.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.