πŸ“Š JAVA
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]);
  }
}
  • (A) RAM
  • (B) HDD
  • (C) MOUSE
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (C) MOUSE

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
275
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
97%
Success Rate