System.out.println(name.toUpperCase() + " IS RIDING THE HORSE");
}
}
public class Test {
public static void main(String[] args) {
Animal horse = new Horse();
/*INSERT*/
}
}
Which of the following options, if used to replace /*INSERT*/, will compile successfully and on execution will print EMMA IS RIDING THE HORSE on to the console?
Choose 4 options.
Answer: A,C
Question 2
Question ID: UK8292809
Consider below code of Test.java file:
package com.examtest.ocp;
public class Test {
public static void main(String[] args) {
System.out.println(add(90, 7));
System.out.println(add('a', 1)); //ASCII code for 'a' is 97 and 'b' is 98