KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How come the following prints boss and not bass? String boss = "boss"; char[] array = boss.toCharArray(); for(char c : array) { if (c== 'o') c = 'a'; } System.out.println(new String(array)); //How come this does NOT print out bass?It prints boss.
Tags (comma-separated)
Save Edits
Cancel