Solved

Select an Appropriate Expression to Complete the Following Method, Which

Question 7

Multiple Choice

Select an appropriate expression to complete the following method, which is designed to visit the elements in theList and replace each occurrence of the string "hello" with the string "goodbye". Select an appropriate expression to complete the following method, which is designed to visit the elements in theList and replace each occurrence of the string  hello  with the string  goodbye .    A) iterator.next()  =  goodbye ; B) iterator.previous( goodbye ) ; C) iterator.replace( hello ,  goodbye ) ; D) iterator.set( goodbye ) ;


A) iterator.next() = "goodbye";
B) iterator.previous("goodbye") ;
C) iterator.replace("hello", "goodbye") ;
D) iterator.set("goodbye") ;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions