adspace


What is public/private protected in java?

Answer Posted / Hitesh Pandey

In Java, access modifiers include: "public" (can be accessed from any class or package), "protected" (can be accessed within the same package and subclasses of other packages), and "private" (can only be accessed within the same class).

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to print count of empty strings in java 8?

1085


What is a classloader in java?

1087


What do you mean by an interface in java?

1101


What is a constructor overloading in java?

1124


What is parsing in java?

1039


How to sort array in descending order in java?

994


How to create a base64 decoder in java8?

1136


Differentiate between static and non-static methods in java.

1126


What is java string pool?

1080


What is the difference between equals() and == in java?

1038


explain different ways of using thread? : Java thread

1080


Is minecraft 1.15 out?

1045


Realized?

2260


What is the difference between break and continue statements?

1124


Explain public static void main(string args[]) in java.

1074