So I was wondering if I could declare an instance field(ex. str1) and a parameter with the same name. Basicly, I ran something akin to
private String str1;
private String str2;
StringTester str= new StringTester(String str1, String str2)
{
str1=str1;
str2=str2;
}
The tester class printed out null when I asked for str1. Was I supposed to use "this" or is that not applicable at all? (I know this is bad programming convention, but I was just wondering.