Solved

Which of the Following Statements Converts a String Object Variable

Question 21

Multiple Choice

Which of the following statements converts a String object variable named str to an int and stores the value in the variable x?


A) int x = Integer.integer(str) ;
B) int x - str;
C) int x = Integer.parseInteger(str) ;
D) int x = Integer.parseInt(str) ;

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