Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Lesson1;
- public class LessonOne {
- public static void main(String[] args) {
- String i1 = "use ";
- String i2 = "knowledge ";
- String i3 = "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(i1), st.indexOf(i1)+i1.length()));
- System.out.print(st.substring(st.indexOf(i2), st.indexOf(i2)+i2.length()));
- System.out.print(st.substring(st.indexOf(i3), st.indexOf(i3)+i3.length()));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement