What's the default access specifier for variables and methods of a class?



What's the default access specifier for variables and methods of a class?..

Answer / Pradip Kumar Dubey

"By default, variables and methods in a class have package-private access (i.e., 'default') if no specific access modifier is specified"

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is autoboxing and unboxing?

1 Answers  


Can you access non static variable in static context?

1 Answers  


What do you understand by the bean persistent property?

1 Answers  


What is a parameter example?

1 Answers  


What does escaping a character mean?

1 Answers  


How do you start a new line in java?

1 Answers  


i need income tax program using java inheritance concept. could u please help me?

2 Answers  


Can we declare the static variables and methods in an abstract class?

1 Answers  


What is the primary benefit of encapsulation?

1 Answers  


Class A extends Class B but Class A also inherit Super Class Object so it is multiple inheritence give reason in support of your answer

3 Answers  


What is the console in java?

1 Answers  


What is meant by event handling?

2 Answers  


Categories