Solved

Assume the Following Variable Has Been Declared and Given Values

Question 82

Multiple Choice

Assume the following variable has been declared and given values as shown:
String name = "Mamey, Jean";
Which statement will print the name as "Jean Mamey"?


A) System.out.print(name.substring(7) + " " + name.substring(0, 5) ) ;
B) System.out.print(name.substring(8, 4) + " " + name.substring(1, 5) ) ;
C) System.out.print(name.substring(8) + " " + name.substring(1, 4) ) ;
D) System.out.print(name.substring(2) + " " + name.substring(1) ) ;

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