What is the default modifier in Interface?

Answers were Sorted based on User's Feedback



What is the default modifier in Interface?..

Answer / ravikiran(aptech mumbai)

public+abstract for methods

public+abstract for interface declaration

public+static+final for the interface declaration variable

Is This Answer Correct ?    32 Yes 5 No

What is the default modifier in Interface?..

Answer / guest

Default modifier in Interface is public.

Is This Answer Correct ?    33 Yes 10 No

What is the default modifier in Interface?..

Answer / prashant renge

Public is the default modifier for interface

Is This Answer Correct ?    10 Yes 5 No

What is the default modifier in Interface?..

Answer / raj kumar sav

All of the methods in an interface are implicitly abstract.
Every method declaration in an interface specifies the
formal parameters and return type of the method, but it
does not include an implementation of the method.

All of the variables in an interface are implicitly static
and final.

Interface Modifiers
The keywords public and abstract can appear as modifiers at
the beginning of an interface declaration. In this
situation, these modifiers have the following meanings:


public

If an interface is declared public, it can be referenced by
any class or interface. If the public modifier is not used,
however, the interface can only be referenced by classes
and interfaces in the same package. A single source file,
or compilation unit, can only declare one public class or
interface (see Compilation Units for an exception to this
rule).


abstract

An interface is implicitly abstract; so all of the methods
in an interface are implicitly abstract. Including the
abstract modifier in an interface declaration is permitted,
but it does not change the meaning of the interface
declaration.

Is This Answer Correct ?    2 Yes 1 No

What is the default modifier in Interface?..

Answer / hemanth

public abstract for methods
public static final for data members

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Can an abstract class be a final class?

0 Answers  


What is meant by constructor?

8 Answers  


Why is a constant variable important?

0 Answers  


What is adapter in java?

0 Answers  


How to declare unique ArrayList ?

6 Answers   RMSI,






Explain parallel processing in java8?

0 Answers  


How static variable work in java?

0 Answers  


What are disadvantages of java?

0 Answers  


What is java basic concept?

0 Answers  


why are there separate wait and sleep methods? : Java thread

0 Answers  


What is the difference between a switch statement and an if statement?

0 Answers  


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.

0 Answers   Manhattan,


Categories