What access modifiers can be used for variables?
Answer / Mohammad Ali Mehdi
In Java, there are four types of access modifiers that can be used for variables: private (accessible only within the same class), protected (accessible within the same package and subclasses in other packages), public (accessible from everywhere), and default or package-private (accessible within the same package)
| Is This Answer Correct ? | 0 Yes | 0 No |
What is entry set in java?
How long will it take to learn java?
What modifiers can be used with a local inner class?
When do we use synchronized methods in java?
What is scanner in java?
How many types of flags are there?
What is Session reduplication and how its done?
Which arithmetic operations can result in the throwing of an arithmeticexception?
What is array length?
What is a Wrapper class?
What is the use of singleton?
What is the flag in java?