Explain about public and private access specifiers?



Explain about public and private access specifiers?..

Answer / Jai Prakash Kaim

"The public access specifier in Java allows any class within the package or outside the package to access a variable, method or constructor. The private access specifier only allows the defining class to access it."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is Collections API?

1 Answers  


What is strings in java?

1 Answers  


What is vector capacity in java?

1 Answers  


Does java have extension methods?

1 Answers  


What is the difference between a public and a non-public class?

2 Answers  


What are variable names?

1 Answers  


What are listeners in java and explain ?

2 Answers   TCS,


explain oops concepts with examples?

29 Answers   AbhiBus, Beeline, DELL, HCL, Satyam, TCS, VLS, Wipro,


What are inner and anonymous class?

3 Answers  


What are bind parameters?

1 Answers  


if u open login & logout ,how can udisplay the timelogin & logout members ?

1 Answers   Virtusa,


i need to know the site which compiles and run the java program completely in online... thank you for your reply in advance

2 Answers  


Categories