πŸ“Š JAVA
Q. What will be the output of the following Java code?
class area
{
int width;
int length;
int area;
void area(int width, int length)
{
this.width = width;
this.length = length;
}

}
class Output
{
public static void main(String args[])
{
area obj = new area();
obj.area(5 , 6);
System.out.println(obj.length + " " + obj.width);
}
}
  • (A) 0 0
  • (B) 5 6
  • (C) 6 5
  • (D) 5 5
πŸ’¬ Discuss
βœ… Correct Answer: (C) 6 5

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
92
Total Visits
πŸ“½οΈ
12 mo ago
Published
πŸŽ–οΈ
Sandhya Thakur
Publisher
πŸ“ˆ
81%
Success Rate