Bharath Raja wrote:Please remember, protected modifier can have accessible within the package only. If you want to use that variable then leave it as default modifier
This is not true Bharath Raja , the above code will compile and output:
10
10
0
10
10
which is a proof that your statment is not true