Sorry if my question is silly or not it doesnot matter. But i just want to know what will happen in these two conditions.
public class Test {
public stat
The first if-statement test, whether str equals "test". The second if-statement test, whether "test" equals str. So the difference between these two if-statements is, that in the first you send a message to the str object with the argument "test". then the str object compares, whether it equals to the argument and return true or false. The second if-statement send a message to "test". "test" is also a string object. So now "test" compares, whether it equals to str and return true or false.