0
Given the following code, what will be the result?
public class Test {
public static void main(String[] args) {
Object obj = new String("Hello");
String str = (String) obj;
System.out.println(str);
}
}- AThrows ClassCastException.
- BRuntime error.
- CHello will be printed.
- DCompilation error.
Correct answer: C