Why the given declarations are invalid in java? discuss. which modifier is applicable for a local variable? why? class test{ public static void main(string[] args) { static int a; public int a; private int a; protected int a; } }?
Answers
Answered by
3
protected is invalid because we can't modify it's value. public is applicable for a local variable because it can be called or we can modify it's value during execution
Similar questions