我可以this
在方法中使用,还是错误的?
领域:
private int level;
private String name;
方法
public void check(String Name, int newlevel)
{
if (this.level < newlevel )
{
this.level = newslevel;
this.Name = Name;
System.out.println("." Name+" you are in the right level);
}
else
{
System.out.println("Sorry your are not on the right level" );
}
}