Question
Please answer quickly 1- If a class supplies at least one constructor but does not supply a no-argument constructor, it is illegal to construct objects
Please answer quickly
1-
If a class supplies at least one constructor but does not supply a no-argument constructor, it is illegal to construct objects without supplying arguments.
Select one:
True
False
2-
In the following code, Specs can 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
3-
Immutable object is an object whose value can not be changed after its creation.
Select one:
True
False
4-
All Wrapper classes are immutable in Java except StringBuilder class
Select one:
True
False
5-
In the following code:
public interface Lambdas extends Shape{
void print();
void printOdds(int n);
}
Select one:
a.
Lambdas is and interface but Shape is a class
b.
None of these
c.
Both Lambdas and Shape are classes
d.
Both Lambdas and Shape are interfaces
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