answersLogoWhite

0

According to a beginner's book on Java, an interface can't have constructors. Also, the interface itself can't contain the method implementation.

User Avatar

Wiki User

17y ago

What else can I help you with?

Continue Learning about Engineering

In C plus plus is it possible to instantiate an array without specifying a length?

No. You can declare a dynamic array without specifying a length, but in order to physically instantiate (either by using malloc or by using object-oriented construction) you must provide a length.


What interface is an interface that uses graphics as compared to a command-driven interface?

Graphical User Interface


Is Iterator a class or Interface?

Its an interface.


Can interface implement the other interface?

No. An interface cannot implement another interface, it can only just extend it. Because, an interface cannot implement any method as it has no method body declarations.


Do abstract classes and pure virtual functions have practical value in the real world?

Yes. An abstract class is a conceptual class (an incomplete class) that provides a generic interface for two or more actual classes (the derived classes). For instance, a shape is not an actual object, nor is a mammal. They are simply a type of object; a conceptual object. A square is an actual type of shape, just as a golden Labrador is a specific breed of dog, an actual mammal. The conceptual classes merely provide a generic interface to the actual object, but do not have enough information to implement that interface. For instance, all shapes can be drawn, but without knowing what type of shape to draw, the conceptual shape cannot implement the draw method, it can only provide the interface. By declaring the shape::draw method to be pure-virtual, you not only ensure that you cannot instantiate a shape by itself (it is merely an abstraction), you also ensure that all the derivatives of the shape class provide a specific implementation of that interface.

Related Questions

Can you instantiate an object of interface?

No. An interface can only be implemented.


Can you instantiate an abstract class?

No. You must create a subclass of the abstract class in order to be able to instantiate it.


How do you declare a pointer variable in c?

int* pint; // instantiate a pointer to an int. float* pflt; // instantiate a pointer to a float.


What is a good explanation of instantiate?

The term 'instantiate' can be used in many different ways. The word 'instantiate' is a term meaning to provide an example. One way an individual might use the term is 'The mom instantiated how to tie her shoe.'


What words start with instant?

-instantly -instantaneous -instantiate -instants


What is the difference between these words instantiate substantiate transubstantiate?

sthdjhgjh


How do you instantiate in vbnet?

dim obj as object obj = new object();


What are the types of network interface card?

Gigabit Ethernet interface Controller interface Serial interface Multilink Group interface MFR (Multilink Frame Relay bundle interface) Dialer interface Loopback interface Tunnel interface ATM interface


In C plus plus is it possible to instantiate an array without specifying a length?

No. You can declare a dynamic array without specifying a length, but in order to physically instantiate (either by using malloc or by using object-oriented construction) you must provide a length.


What interface is an interface that uses graphics as compared to a command-driven interface?

Graphical User Interface


What is a tagging interface type?

A tagging interface type in Java is an interface that has not defined methods such as the java.io.Serializable interface.


Does a corsa have an interface on non interface engine?

Does a Chrysler Sebring 2008 have an interface or non interface engine