Question: please quickly 1) You can use the following method header to override the equals method in Object class: public boolean equals(Object obj) Given that the
please quickly
1)
You can use the following method header to override the equals method in Object class:
public boolean equals(Object obj)
Given that the class (wherein this method is defined) implements the Serializable interface
Select one:
True
False
2)
Given that Student is a class, how many reference variables and objects are created by the following code:
Student studentName, studentId; studentName = new Student(); Student stud_class = new Student();
Select one:
a.
Three reference variables and three objects are created.
b.
Three reference variables and two objects are created.
c.
One reference variable and two objects are created.
d.
Two reference variables and two objects are created.
3)
The following statement is used only to check for division by zero exception
catch(Exception e)
{
System.err.println(e.toString());
}
Select one:
True
False
4)
In the following code, Specs must be an inner class to class MobilePhone:
public MobilePhone(String name, String brand,double price,int ram,int hd,int cameras,String os)
{
this.mobileName=name;
this.mobileBrand=brand;
this.mobilePrice=price;
this.specs=new Specs(ram, hd, cameras, os);
}
Select one:
True
False
5)
In the following statement:
Employee e1=new Manager();
e1 is known to be a polymorphic variable, given that the Class Manager implements the Employee interface.
Select one:
True
False
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
