Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class HomeTask {
- public static void main(String[] args) {
- new HomeTask().stringParams("Hello", "Wor", "ld");
- }
- public void stringParams(String a, String b, String c){
- String concat_str = a + b + c;
- System.out.println(a + ", " + concat_str.indexOf(a) + ", " + (concat_str.indexOf(a) + a.length()) + ", " + a.length());
- System.out.println(b + ", " + concat_str.indexOf(b) + ", " + (concat_str.indexOf(b) + b.length()) + ", " + b.length());
- System.out.println(c + ", " + concat_str.indexOf(c) + ", " + (concat_str.indexOf(c) + c.length()) + ", " + c.length());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement