Created
October 17, 2015 19:23
-
-
Save edinak1/be06ddc76b6448b410da 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 homeWork1; | |
public class ChangeTheWolrd { | |
public static void main(String[] args) { | |
String s="Education is the most powerful weapon which you can use to change the world."; | |
String t="An investment in knowledge pays the best interest."; | |
System.out.print("\""+s.substring(s.indexOf("use"),s.indexOf("use")+"use".length())+" "+ | |
t.substring(t.indexOf("knowledge"),t.indexOf("knowledge")+"knowledge".length())+" "+ | |
s.substring(s.indexOf("to"),s.length()-1)+"\""); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment