1.

What is the remaining capacity of BlockingQueue whose intrinsic capacity is not defined?(a) Integer.MAX_VALUE(b) BigDecimal.MAX_VALUE(c) 99999999(d) Integer.INFINITYThis question was addressed to me in an interview for job.The above asked question is from Data Structures-Queue topic in portion java.util – The Collections Framework of Java

Answer»

Correct option is (a) Integer.MAX_VALUE

To elaborate: A BlockingQueue WITHOUT any INTRINSIC capacity CONSTRAINTS always REPORTS a REMAINING capacity of Integer.MAX_VALUE.



Discussion

No Comment Found

Related InterviewSolutions