package stringobjcreation; public class Str1 { public static void test1(Str2 str2) { String a = "abc"; str2.test2(a); } }