fix the syntrax errors in the following:
public class AA
{
private int x;
private int y;
publicvoid print()
{
System.out.println(x + "" + y);
}
publicint sum()
{
return x + y;
}
publicAA()
{
x = 0;
y = 0;
}
publicint AA(int a, int b)
{
x = a;
y = b;
}
}
Answers
Corrected Program
public class AA {
private int x;
private int y;
// Fixed method header
// (improper spacing)
public void print( ) {
System.out.println(x + "" + y);
}
// Fixed method header
// (improper spacing)
public int sum( ) {
return x + y;
}
// Fixed method header
// (improper spacing)
public AA( ) {
x = 0;
y = 0;
}
// Removed the return type from
// method header as a constructor
// cannot have a return type.
public AA(int a, int b) {
x = a;
y = b;
}
}
Answer:
Hey mujhe koi answer noi mila bolo kya tu mera friend banega kamina xD
Cloth left with Tina = 20m 5cm - 4m 50cm
= (19m + 1m + 5cm) - (4m + 50cm)
= (19m + 100cm + 5cm) - (4m + 50cm)
= 19m + 105cm - 4m - 50cm
= 15m + 55cm
= 15m 55cm