When we give defination of interface method in the class why
method must be public???
Answers were Sorted based on User's Feedback
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 |
Answer / prakash
all methods in interfaces are public by default...
Is This Answer Correct ? | 3 Yes | 3 No |
What is an object in java and how is it created?
What is floor math?
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); } }
Why doesn't the java library use a randomized version of quicksort?
Define inheritance with reference to java.
Is node a data type in java?
Is it possible for a yielded thread to get chance for its execution again?
Can we modify the throws clause of the superclass method while overriding it in the subclass?
How do you reverse sort in java?
what is meant by string pooling?
12 Answers Oracle, Polaris, Tribal Fusion, Wipro,
Which is bigger double or float?
What is the lifetime and scope of a variable?