Java Exam 2011 E.C
Java Exam 2011 E.C
System.out.println(celsius);
}
String name;
int roll_no;
public static void main(String[] args) {
student obj = new student();
obj.name = "beharu";
obj.roll_no = 1057;
System.out.println(obj.name);
System.out.println(obj.roll_no);
}
}
B. false
True
static int x = 0, y = 0, z = 0;
static class sum{
void add() {
System.out.println(x+y);
}
void add(int a, int b) {
x = a;
y = b;
System.out.println(a+b);
}
void add(int a, int b, int c) {
x = a;
y = b;
z = c;
System.out.println(a+b+c);
}
}