Welcome aboard! We are happy you are here and wish you good net-raft!
class ReplaceFunc {
String a;
String Result() {
a = a.replace("world","all");
return a;
}
}
public class Main {
public static void main(String[] args) {
ReplaceFunc mytext = new ReplaceFunc();
String MyRepText;
mytext.a = "Hello world!";
MyRepText = mytext.Result();
System.out.println(MyRepText);
}
}
The most helpful JAVA solutions
how to get the minimum value from array using java ?JAVA
Click to see more ...
940
49
how to create lower case using java ?JAVA
Click to see more ...
823
41
get userdomain using java JAVA
Click to see more ...
653
37
how to get the values from an array using java ?JAVA
Click to see more ...
549
32
how to create the replace function of special characters using java ?JAVA
Click to see more ...
388
31
how to get the second value from an array using java ?JAVA
Click to see more ...
362
19
how to create upper case using java ?JAVA
Click to see more ...
300
17
How to read a key on the keyboard using java ?JAVA
Click to see more ...
481
16
how to get the maximum value from array using java ?JAVA
Click to see more ...
298
13
how to create replace function using java ?JAVA
Click to see more ...
258
12