Q. What will be the output?
public class Test{
public static void main(String args[]){
Object myObj = new String[]{"one", "two", "three"};
{
for(String s : (String[])myObj)
System.out.print(s + ".");
}
}
}
public class Test{
public static void main(String args[]){
Object myObj = new String[]{"one", "two", "three"};
{
for(String s : (String[])myObj)
System.out.print(s + ".");
}
}
}
β
Correct Answer: (A)
one.two.three.