类代码
public class Person1 {
String name;
public void sayHello(String name){
System.out.println(name+",你好,"+"我是"+this.name);
System.out.println(this);
}
对象代码
public class demo03Person1 {
public static void main(String[] args) {
Person1 one =new Person1();
one.name="王建林";
one.sayHello("王思聪");
System.out.println(one);
}