What are access modifiers in Java ?

Answer Posted / niranjanravi

we have 4 access modifiers in java.
public
private
protected
default

Is This Answer Correct ?    14 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is ststic with example

1781


What's a method in programming?

731


Is minecraft java edition free?

815


Distinguish between a predicate and a function?

741


What is pre increment and post increment in java?

689


Can main() method in java can return any data?

877


Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?

712


Difference between error and exception

5428


Why collection doesn’t extend cloneable and serializable interfaces?

856


What is a databasemetadata?

706


What is this () in java?

743


Program to Find the second largest element in an array.

793


What is the difference between interface & abstract class?

774


Is age a discrete variable?

707


Can you declare the main method as final?

701