write a java statement to create two objects of class 'Toy' named 'Soft toy' 'Electronic toy'
Answers
Answered by
7
Toy SoftToy = new Toy();
Toy ElectronicToy = new Toy();
.
.
.
.
HOPE THIS HELPS YOU
.
.
.
.
PLEASE MARK AS BRAINLIEST AND FOLLOW ME TOO
Answered by
6
Question:-
Write a Java statement two create two object of class 'Toy' named 'Soft toy' and 'Electric toy'
Statement:-
Toy SoftToy = new Toy();
Toy ElectricToy=new Toy();
Note:-
The new keyword is used to create objects of the class.
Similar questions
Math,
4 months ago
Math,
4 months ago
Hindi,
4 months ago
Political Science,
8 months ago
Computer Science,
8 months ago
Math,
1 year ago
Math,
1 year ago