how can you create a class data member in Java
Answers
Answered by
2
Answer:
In java, we can create class data member using access modifier. access modifier can be private, protected, default and public.
Explanation:
A class member is declared with an access modifier to specify how it is accessed by the other classes in Java. A Java class member can take any of the access modifiers, such as - public, protected, default and private.
Similar questions