Created
February 17, 2016 20:47
-
-
Save ilyaBrandon/7cf8a8eadbd4c9319392 to your computer and use it in GitHub Desktop.
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
| public class Documents { | |
| public static void main(String[] args) { | |
| String a1 = "use "; | |
| String b2 = "knowledge "; | |
| String c3 = "to change the world "; | |
| 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 st = s + t; | |
| System.out.print(st.substring(st.indexOf(a1), st.indexOf(a1) + a1.length())); | |
| System.out.print(st.substring(st.indexOf(b2), st.indexOf(b2) + b2.length())); | |
| System.out.print(st.substring(st.indexOf(c3), st.indexOf(c3) + c3.length())); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment