Q. For the below mentioned code snippet:
var o = new Object();
The equivalent statement is:

  • (A) var o = Object();
  • (B) var o;
  • (C) var o= new Object;
  • (D) Object o=new Object();
πŸ’¬ Discuss
βœ… Correct Answer: (C) var o= new Object;
Explanation: You can always omit a pair of empty parentheses in a constructor invocation.
Explanation by: Mr. Dubey
You can always omit a pair of empty parentheses in a constructor invocation.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
188
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
94%
Success Rate