Solved

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

Question 115

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