Limited access

Upgrade to access all content for this subject

Which substring method call will return the middle two characters of any given even length string of length 2 or more?

A

str.substring(str.length()/2);

B

str.substring(str.length()/2, 2) ;

C

str.substring(str.length()/2 - 1) ;

D

str.substring(str.length()/2-1, str.length()/2+1)) ;

E

str.substring(str.length()/2 - 1, 1) ;

Select an assignment template