Java OCA OCP Practice Question 3029

Question

Which of the following classes in the java.util.concurrent.atomic package inherit from java.lang.Number? (Select all that apply.)

a)AtomicBoolean
b)AtomicInteger
c)AtomicLong
d)AtomicFloat
e)AtomicDouble


b) 
c)

Note

Classes AtomicInteger and AtomicLong extend Number class.

option a) AtomicBoolean does not extend java.lang.Number.

options d) and e) Classes named as AtomicFloat or AtomicDouble do not exist in the java.util.concurrent.atomic package.




PreviousNext

Related