When we give defination of interface method in the class why
method must be public???

Answers were Sorted based on User's Feedback



When we give defination of interface method in the class why method must be public???..

Answer / pradeep singh

because class which implements the interfaces if the
access modifiers are protected or private then we can not
override this metods. somethos must be publicand java there
is notmultiple inheritance

Is This Answer Correct ?    7 Yes 1 No

When we give defination of interface method in the class why method must be public???..

Answer / prakash

all methods in interfaces are public by default...

Is This Answer Correct ?    3 Yes 3 No

Post New Answer

More Core Java Interview Questions

What is an object in java and how is it created?

0 Answers  


What is floor math?

0 Answers  


What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } } 10. What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } }

1 Answers  


Why doesn't the java library use a randomized version of quicksort?

0 Answers  


Define inheritance with reference to java.

0 Answers  






Is node a data type in java?

0 Answers  


Is it possible for a yielded thread to get chance for its execution again?

0 Answers  


Can we modify the throws clause of the superclass method while overriding it in the subclass?

0 Answers  


How do you reverse sort in java?

0 Answers  


what is meant by string pooling?

12 Answers   Oracle, Polaris, Tribal Fusion, Wipro,


Which is bigger double or float?

0 Answers  


What is the lifetime and scope of a variable?

0 Answers  


Categories