I made a class P and Q-extends P. P has a static string S. Both classes have a non-static method to edit S. Instances of P and Q share one static string. But, that is not the case for int. I get errors "cannot find symbol : variable <your-static-variable>" if i replace String with an int (after making the necessary changes to code).
What is happening ?
errors like- Cannot find symblo must be easy to spot. There would be not much of logic or thinking involved in spotting them. If we try to think too much then we would get misguided and end up in a big mess.