If a number has been defined as an int variable, both System.out.println(number) and System.out.println(String.valueOf(number)) will print out its value.
The statement is true. If a number has been defined as an int variable, both of the following statements will print out its value:
System.out.println(number);
System.out.println(String.valueOf(number));
Here, System.out.println(number); will automatically convert the int variable to a string and print its value. Similarly, System.out.println(String.valueOf(number)); will explicitly convert the int variable to a string and print its value.
Therefore, both statements will print out the value of the int variable.