Invoking Methods with Type Casting

Report a typo

In Java, consider the following methods defined in a class:

public static void printNumber(int number) {
   System.out.println(number);
}

public static void printNumber(double number) {
   System.out.println(number);
}


How would you call the methods above, to print an integer value 10, a double value 5.5, and a string that must be type casted and parsed to an integer 20?

Select one option from the list
___

Create a free account to access the full topic