Answer to Question #51022 in Java | JSP | JSF for Charles Wang
Question #51022
How do I choose and edit a specific class that is in a java library using the str.replace method?
Expert's answer
public String replace(char oldChar, char newChar)
This method returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.
Therefore it is only possible to modify only argument of class methods.
To modify library class you may use inheritance and replace library class with your own class.
This method returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.
Therefore it is only possible to modify only argument of class methods.
To modify library class you may use inheritance and replace library class with your own class.
Need a fast expert's response?
Submit orderand get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment