Can interface be private in java?



Can interface be private in java?..

Answer / Ekant Srivastava

No, interfaces cannot be declared as private in Java. They are by default public and must be accessed from outside their declaring class or another interface.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box.

1 Answers   Manhattan,


whats is inheritance?

15 Answers   CTS, HCL,


Can we override protected method in java?

1 Answers  


What is a parameter in a function?

1 Answers  


How to sort an array from smallest to largest java?

1 Answers  


What is data object example?

1 Answers  


Can an interface be final?

1 Answers  


Can we override static methods in java?

1 Answers  


What is the purpose of assert keyword used in jdk1.4.x?

1 Answers  


Why does java does not support multiple inheritance? Explain

1 Answers  


What is a parameter in java?

1 Answers  


Explain the concept of hashtables?

1 Answers  


Categories