Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


What are different types of access modifiers?

Answers were Sorted based on User's Feedback



What are different types of access modifiers?..

Answer / venki

Private : It can access with in the class only
public :It can Access Any where
proteced:It can access with in the package and sub class of
the package also
default:it access with in the package only.

Is This Answer Correct ?    13 Yes 3 No

What are different types of access modifiers?..

Answer / shekhar suchak

private:it can be access within the block or we can aslo say that within the class.

public:"every where,any where" just one line ans.

protected:it can be access within package and outside of package.but there should be inheritense.

default:it will be access within the package.

class can not be private and protected.its only default and public.we dont have to mention 'default' keywords it always be there,but invisible.

Thanks & Regards

Is This Answer Correct ?    0 Yes 0 No

What are different types of access modifiers?..

Answer / nani

Private : It can access with in the class only
public :It can Access Any where in java program
proteced:It can access with in the package and sub class of
the package also
default:it access with in the java program.

Is This Answer Correct ?    0 Yes 2 No

Post New Answer



More Core Java Interview Questions

placement papaers of spring computing technology

0 Answers   Spring Computing Technologies,


Can a class be declared as static?

0 Answers  


AWT event listeners extends what interface?

1 Answers  


What is Map interface?

3 Answers   Wipro,


What is the use of bin and lib in JDK?

8 Answers   TCS,






why java is platform independent?

5 Answers   IBM, SparkTG,


Explain what is Marker interface?

0 Answers   BirlaSoft,


What is singleton class in ruby?

0 Answers  


What is java util hashmap?

0 Answers  


Is it possible to use Semaphore/ Mutex in an Interrupt Handler?

0 Answers   Ciena,


What are the different types of garbage collectors in java?

0 Answers  


What is abstraction in java?

0 Answers   Akamai Technologies,






Categories