answersLogoWhite

0

The valueOf functions are used in the Java wrapper classes to convert between types. Common uses are converting a number to a String or vice versa. You are encouraged to use these functions instead of creating a new object from a constructor because of the way Java caches values. A call to valueOf will give you the same result as creating a new object, but it may be more efficient if you're creating the same values multiple times.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How do you use settime out in php?

we cant use set timeout function in php because it is of java script function


How will you convert wrapper integer into primitive integer in java?

All integeral wrapper class (Byte,Short,Integer,Long)contains the following valueOf() .public static wrappertype valueOf(String s,int radix);integer I=Integer.valueOf("1010",2);output is 10....


What is function in java terminology?

In Java, a function is called a "method". In Java as well as other languages, a method is a function defined specifically for one class. In Java, this is the only way to define functions, therefore, all functions are methods.In Java, a function is called a "method". In Java as well as other languages, a method is a function defined specifically for one class. In Java, this is the only way to define functions, therefore, all functions are methods.In Java, a function is called a "method". In Java as well as other languages, a method is a function defined specifically for one class. In Java, this is the only way to define functions, therefore, all functions are methods.In Java, a function is called a "method". In Java as well as other languages, a method is a function defined specifically for one class. In Java, this is the only way to define functions, therefore, all functions are methods.


What is the use of object cloning in java?

It allows you to keep the original object untouched. In Java, objects are accessed by reference meaning that when you pass it in a function, anything done to it in the function modifies the original object directly.


What does valueOf do in Java?

the valueOf method is used to convert from its original computerized format into a format understandable by humans. For example, the String object has this command overloaded so that may different types of objects can be turned into strings. int i = 111 String i = String.valueOf(i); The value "111" would be loaded into String i.


Is main a predefined function in java?

No. It is a user defined function which the person who is creating the java class has to code by himself.


In java public static voidmain function denotes what?

Java's main function denotes the entry point into the execution of your program.


What are functions in JAVA?

for loop function


What is instant variable in java?

objects whose properties are different instance datamember n member function are use for that


Concat a string without using any inbuilt function in java?

Use "+". Example: String string = "does this answer " + "your question?";


Who invoke main function in java?

The Java Runtime Environment invokes main methods.


Can you use pointers in java?

Java does not support Pointers and hence you cannot use it in Java.