The short answer: because C is not object-oriented.
The reason for C++ not having interfaces is, that C++ supports multiple inheritance. Because C++ classes can be derived from more than one base class, so there is no need to have interfaces.
In Java, each class has exactly one base class (except the class Object). With the help of interfaces it is possible implement a restricted (and more stable) form of multiple inheritance.
Interfaces follow implicitly the following rules:
* interfaces are abstract
* each method is public abstract
* each attribute is public static final
I guess you mean Java, there is no interface in C++.
Java Native Interface JNI is an interface between java and applications and libraries written in other languages. As an example, JNI enables Java programs to use C libraries and also enables C programs to use Java classes.
Interface Java can be used for a variety of tasks and commands such as .swf files, Java files, running scripts, as well as website video players for websites.
NO, we cannot create a contructor for an interface in java.
yes we can define a variable in an interface in java.
Generally, they are used to give additional information about the behaviour of a class.It is just used to "mark" Java classes which support a certain capability . Examples: java.util.RandomAccess java.io.Serializable java.rmi.Remote java.util.EventListner javax.servlet.SingleThreadModel java.lang.Clonable javax.ejb.EnterpriseBean
If by interface you mean, a mechanism to achieve abstraction and create a blueprint for future implementation. Java/C#/C++ all allow for multiple interfaces(abstract classes in C++) to be implemented.
Java's List interface defines the size() method, which can be used to retrieve the length of a list.
interface is a list of methods which implements that interface
A tagging interface type in Java is an interface that has not defined methods such as the java.io.Serializable interface.
Runnable interface
Yes. This is a valid interface definition in Java: interface Useless {}