Solved

The JCF Stack Class Is Used to Instantiate a Stack

Question 16

Multiple Choice

The JCF Stack class is used to instantiate a stack:
Stack< Integer > intStack = new Stack< Integer >() ;
The statements
Int k = 77;
IntStack.push(k*k) ;
Use the primitive type int instead of the wrapper type Integer.These statements


A) cause a compile time error
B) compile and execute correctly
C) cause a ClassCastException
D) None of the above

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions