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,
3 months ago
English,
3 months ago
Math,
3 months ago
Political Science,
6 months ago
Computer Science,
6 months ago
Math,
10 months ago
Math,
10 months ago