Created
October 17, 2015 16:33
-
-
Save edinak1/deb410e08bb6513ef3bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package numbers; | |
public class Seventh { | |
public static void main(String[] args) { | |
String name="Let us always meet each other with smile, for the smile beginning of love."; | |
System.out.println(name.replace("smile",":)")); | |
//TEST for .replace() interesting for me:)) | |
System.out.println(name.replace(":)","smile")); | |
System.out.println(name.replace("smile"+" ",":)")); | |
System.out.println(name.replace(" ","")); | |
System.out.println(name.replace("","@")); | |
System.out.println(name.replace(" ","*")); | |
String str=""; | |
System.out.println(str.replace("","Hello!")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment