Question
1- A class with one or more abstract methods must not be declared abstract. Select one: True False 2- Based on the below code: Restaurant
1- A class with one or more abstract methods must not be declared abstract.
Select one:
True
False
2-
Based on the below code:
Restaurant res=new Restaurant("Default Name");
Restaurant.Address add=res.new Address();
The class Restaurant is considered as an:
Select one:
a.
None of these
b.
Outer Class to Class Address
c.
A parent class to class Address
d.
Inner Class to Class Address
3-
ou 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
4-
In the following code, Specs can not 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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started