answersLogoWhite

0


Best Answer

Objects are very useful in calling a method because they inherit the whole class of the object in the RAM to be executed. And, so a person can each & every method of the class.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is an object in java and is it useful in calling a method?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is method call in java?

Calling a method in Java is when you run code associated with a specific class, using the name of an instance object of a class, followed by the dot operator, followed by the name of the method, followed by the arguments of the method, enclosed in parentheses.


Does Every class has a toString method and an equals method inherited from the Object class?

Yes - in Java, every class has this method, which is inherited from the Object class. Often, the inherited method does nothing particularly useful, but you can override it with your own implementation.


Explain the importance of this keyword in java?

this is treated like a pointer to the object it's written in. It's important if you want to call a method with the object calling it as an argument, or something like that.


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.


How do you communicate between object and object in java?

Communication between objectIn java , objects communicate by message passing.An object oriented program is nothing but a bunch of objects telling each other what to do". To pass a message to an object means that a call to a method of that object is placed.An object by itself is not incredibly useful. In general, it takes more than one object to really do anything meaningful. Since multiple objects typically need to communicate with each other, it stands to reason that an OOP language such as Java must provide some kind of object communication mechanism.Object: An object is a collection of data and the procedures (methods) that act on that data.Java Messages:Java objects use messages to communicate with each other. Messages simply tell an object what to do. In Java, the act of sending a message to an object involves calling one of the object's methods .It is a common practice to pass additional information along with a message. This information is passed along with the message as message parameters. More specifically, the message information is passed into a method as method parameters.Message passingis another way of saying "method calling." When an object sends a message to another object, it is really just calling a method on that object. The message parameters are really just the parameters to the method. The bottom line is that messages and methods are synonymous.


Why comparator has equals method?

The Java superclass Object says that all Java objects have an equals method. Thus Comparator has an equals method.


What is static java most commonly used for?

Static java method is the same as a static variable. They belong to a class and not an object of that class. If a method needs to be in a class, but not tied to an object, then one uses static java.


What is the difference between garbage collector and finalization?

When all references to an object is Java are gone, the garbage collector will come along and free up the memory used by that object.Every Java object has a method named finalize, which is called by the garbage collector when the memory for that object is being deallocated. "Finalization" is just a name given to the act of calling the finalize method during garbage collection.


What do you mean by this keyword in java?

"this" is a Java keyword that references the current object. Any part of the object(instance variables, methods, constructors) can be accessed by calling this.[member].


How do you call a method in Java?

It's when you take a object and run some code in the class of that object.


What is add method in a java program?

If the "add" is part of the Java Collections API then calling c.add(o) adds an object o to the given collection (list or set). Likewise, the AWT API has add methods to add components to a Frame or Panel.


What is meant by method binding in java?

MethodBinding is an object that can be used to call an arbitrary public method, on an instance that is acquired by evaluatng the leading portion of a method binding expression via a ValueBinding. An immutable MethodBinding for a particular method binding expression can be acquired by calling the createMethodBinding() method of the Application instance for this web application.