answersLogoWhite

0

Can you create an object of interface in java?

Updated: 8/19/2019
User Avatar

Wiki User

13y ago

Best Answer

maybe

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Can you create an object of interface in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can you create a constructor for an interface in java?

NO, we cannot create a contructor for an interface in java.


What is meant by interface in java?

interface is just like a class. its contains abstract methods without any implementation and we cant create object for the class. we can only sub classed . used to achieved multiple inheritance in java.


Can you create an empty interface with no definitions?

Yes. This is a valid interface definition in Java: interface Useless {}


What is abstraction method in java?

Abstraction in Java or Object oriented programming is a way to segregate implementation from interface and one of the five fundamentals along with Encapsulation, Inheritance, Polymorphism, Class and Object. Abstraction in Java is achieved by using interface and abstract class in Java.


How is Java persistence done?

Java persistence is implemented using serialization. Serialization is a technique in java using which the contents of a java object (A class instance) can be written into a flat file. This value can be unserialized or deserialized at a later point of time to create the object. Any class that implements the Serializable interface can be serialized.


What are the functions of an interface in Java?

To create an abstraction or a blueprint for a class to implement later.


Can you initialize an object without constructor in java?

No. if you wish to create an object that you plan on using in a java program then the answer is NO. You cannot initialize an object of a Java class without calling the constructor.


Can you define variables in interface in java?

yes we can define a variable in an interface in java.


What is serializable class in JAVA?

The serializable interface is used to perform the serialization action. Serialization is the process by which the contents of an object are written to any form of storage - say a flat file. This data stored in the flat file can be de-serialized at any time to create the object. Ex: public class Test implements Serializable { … //lots of code }


How do you search for an object in a list and if matches return that object using java?

Using boolen Contains(Object ob) method of List Interface .we can find object through List....


What is Full for of APIs in java?

API stands for Application programming interface. API's are pre-written Java code that can be used by other programmers to create their applications.


What is url connection in java?

Connection interface consists of method for contacting a database . The connection object represents communication context.