Solved

Suppose a Phone Number, Stored as a Ten-Character String (Of

Question 123

Multiple Choice

Suppose a phone number, stored as a ten-character string (of digits only) called phoneNumber must be converted into a string that has parentheses around the area code.Which statement below will do that?


A) String newNumber ="("+
phoneNumber. substring (3,0) +") ";
B) String newNumber ="("+") "+ phoneNumber;
C) String newNumber ="("+
phoneNumber. substring (1,3) +") "+ phoneNumber. substring (3,7) ;
D) String newNumber ="("+phoneNumber.substring (0,3) +") "+ phoneNumber. substring(3, 10) ;

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