What are access modifiers in Java ?

Answer Posted / surendrareddy

The access specifiers in java are
1.public
2.private
3.protected these are control access specifiers in java

The another one is "Default" it will available when we will
not mention above 3 access specifiers before the class variable

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is instance synchronization?

543


Explain what is Marker interface?

618


FOR EXAMPLE WE R HAVING TWO LIST ELEMENTS ..BOTH LISTS CONTAINS ID,NAME,PLACE ..I NEED TO COMPARE BOTH IDS IN TWO LISTS,IF ID'S R SAME MEANS WE HAVE ADD THE DETAILS(LIKE NAME,PLACE) TO MAP...HOW IS POSSIBLE ?CAN ANY ONE SUGGEST?

2637


How do you remove duplicates from an array in java?

530


What is the class in java?

563






Why is java called java?

541


How many java versions are there?

562


How do you convert an int to a string in java?

546


How do I enable java in safari?

549


What is ctrl m character?

518


What is the difference between an argument and a parameter?

539


What is file in java?

562


What are methods in java?

540


What is array in java?

535


What does singleton mean in java?

508