A
Q. What is the output of the below Java program with arrays?
Code:
public class Polo {
public static void main(String args[])
{
String[] computer = {"RAM","HDD","MOUSE"};
String[] parts = {computer[0],computer[2]};
System.out.print(parts[1]);
}
}
public static void main(String args[])
{
String[] computer = {"RAM","HDD","MOUSE"};
String[] parts = {computer[0],computer[2]};
System.out.print(parts[1]);
}
}
- Correct Answer - Option(C)
- Views: 8
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.