what is "this." and what it does?
Posted on 2002-05-27
2 parameters were passed ("userid" and "password") from a.class to another b.class. at b.class, the code looks like below:
public int getprint(String userid, String password)
this.userid = userid;
this.password = password;
Question: although i had been reading the book and internet and am still find it hard to understand what does the "this" here is doing? can someone please tell me in brief what is the "this." here is doing? ps: when i return to System.out.println("this userid = " + this.userid); it fails to display anything.
all experts, please advise :) thanks