We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 696a7cd commit e814ff5Copy full SHA for e814ff5
src/main/java/challenge31_40/Challenge_32.java
@@ -0,0 +1,17 @@
1
+package challenge31_40;
2
+
3
+/**
4
+ * unlike StringBuilder, String are immutable.
5
+ */
6
+public class Challenge_32 {
7
+ public static void main( String[] args ) {
8
+ var jedi = "masterYoda";
9
+ changeString(jedi);
10
+ System.out.println(jedi);
11
+ }
12
13
+ private static String changeString( String word ) {
14
+ word.replace(word, "newMasterYoda");
15
+ return word;
16
17
+}
0 commit comments