πŸ“Š JAVA
Q. What will be the output of the following Java program?
class box
{
int width;
int height;
int length;
}
class mainclass
{
public static void main(String args[])
{
box obj = new box();
obj.width = 10;
obj.height = 2;
obj.length = 10;
int y = obj.width * obj.height * obj.length;
System.out.print(y);
}
}
  • (A) 12
  • (B) 200
  • (C) 400
  • (D) 100
πŸ’¬ Discuss
βœ… Correct Answer: (B) 200

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
88
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Vikash Gupta
Publisher
πŸ“ˆ
88%
Success Rate