Question
Mention the access specifiers used in Java?

Answers

Access specifiers are defined as the keywords that are used before a class name which defines the scope of accessing. The types of access specifiers are:

Public – Class, Methods and Fields are accessible from anywhere.
Private – Methods and Fields can be accessed only from the same class to which they actually belong.
Protected – Methods and Fields can be accessed from the same class to which they belong, from the sub-classes and also from the classes of same package. But they are not accessible from outside.
Default – Methods, Fields, classes can only be accessible from the same package, not from outside.   Your Comment




More Software,Java Questions..
What is the inputsplit in map reduce software?

Can variables be used in Java without initialization?

What is the difference between java bean and enterprise java bean?

What is software configuration management?

How does the java database connectivity (jdbc) work?

What are the advantages of threads in java?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

What is object cloning in Java?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?



Search
Can you Answer!!
  • Q Who were the ashta-diggaja in the court of Krishnadeva Raya ?
  • Q what are the delegates ?where we used delegates in your project?
  • Q Can we make main() thread as daemon?
  • Q What is Talend data generator routine?
  • Q What is the difference between paramaterized constructor and copy constructor?
  • Q How to set database to be SINGLE_USER?
  • Q Describe in detail the Principles and method of preservation of animal cells.
  • Q What is over clocking? what are the advantages of over clocking?
  • Q Where is the headquarters of AB Bank Ltd.
  • Q How much chair-side experience do you have? Describe two chair-side experiences where you felt entirely comfortable and another one that you felt was a struggle.
  • Q What is tb first and tb last?