class Test {
String s = "java";
void method1(Test m1) {
System.out.println("method1(Method m1)");
System.out.println(m1.s);
}
void method2() {
method1(this);
}
}
public class MyClass {
public static void main(String args[]) {
Test t = new Test();
t.method2();
}
}
/*
run:
method1(Method m1)
java
*/