Which of the following are valid at line 1?
public class Main { //line 1: insert code here. }
Select 2 options
toString()
; Correct Options are : A D
A string must be enclosed in double quotes ".
'a' is a char. "a" is a String.
Every class directly or indirectly extends Object class and Object class has a toString()
method.
The toString()
method will be invoked.
The String that it returns will be assigned to s.
There is no variable myValue defined in the given class.