Created
December 5, 2015 19:20
-
-
Save Yur-ok/3abfc3bca06615547e77 to your computer and use it in GitHub Desktop.
Use knowledge to change the world
This file contains hidden or 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 Lesson1_frame5; | |
/** | |
* Created by Юрий on 06.12.2015. | |
*/ | |
public class StringConcatination { | |
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."; | |
String use = s.substring(s.indexOf("use"),s.indexOf(" to")); | |
String know = t.substring(t.indexOf("knowle"),t.indexOf(" pay")); | |
String tochworld = s.substring(s.indexOf("to chang"),s.indexOf(".")); | |
System.out.println(use + " " + know + " " + tochworld); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment