Question 1 · 1
Given TripleThis.java: Compiling TripleThis.java gives this compiler warning: Note: TripleThis.java uses unchecked or unsafe operations. Which two replacements remove this compiler warning and prints 12? (Choose two.)
Choose all answers that apply.
- Replace line 12 with public static void printValue(Function f, int num) {
- Replace line 12 with public static void printValue(Function f, T num) {
- Replace line 9 with Function tripler = x —> { return (Integer) x * 3; }
- Replace line 12 with public static void printValue(Function f, Integer num) {
- Replace line 9 with Function tripler = x -> { return x * 3; }
- Replace line 9 with Function tripler = x -> [ return x * 3; ]