Solved

The JCF Stack Class Is Used to Instantiate a Stack

Question 10

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents