Data Communication and Networking 1 MIDTERm
Data Communication and Networking 1 MIDTERm
class Person
{
private int age;
private Person()
{
age = 24;
}
}
public class Test
{
public static void main(String[] args)
{
Person p = new Person();
System.out.println(p.age);
}
}
a.
Compilation error
b.
Run Time Error
c.
24
d.
Syntax Error