answersLogoWhite

0


Best Answer

Since the question is in the Java category: in Java, the method is called toString(). This method will automatically be invoked if you implicitly convert an object to String type, for example:

"The answer is: " + myObject

In this example, the String concatenation (the plus sign) forces the object, myObject, to type String - to do this, the object's toString() method will be called.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What method that returns string representation of the contents of the variable?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

The substring method returns?

"[Substr] returns a string object with its contents initialized to a substring of the current object."


What are variable of the scientific method?

what are the variable


What method returns the uppercase equivalent of a string?

The toUpperCase() method returns the uppercase equivalent of a string.


A variable that is declared inside a method is called variable?

It is called a local variable since it only exists inside the method.


What is the meaning of a method in Java programming?

a method is a variable


What is the scope of any variable?

The Scope of a variable defines the areas of a program where this variable would be visible and can be used. For ex: a. Method variables - are visible only inside the method where they are declared and hence their scope is only the method b. Class variables - are visible inside the class and can be used by any method inside the class and hence their scope is the whole class.


What method of representation toposheet?

individual practical method with single toposheet


What variable do you change when using the scientific method?

The independent variable


What is object in methods in java?

I guess an object in a method would be any object variable, used within a method. An object variable of course is a variable that is declared as a variable of a certain class type.


What is the method of graphical representation of data?

A pictogram


What variable is affected by the independent cariable in the scientific method?

the independent variable


What is High-low method of variable cost and fixed cost?

High and low method is the method for separating fixed cost and variable cost from mixed cost.