0

We have Class Vehicles, Attributes As vAriables wheels ,color,fuelcapacity,but Where is the Object. Need to know CONCEPT OF OBJ.

public class Vehicle { int maxSpeed; int wheels; String color; double fuelCapacity; void horn() { System.out.println("Beep!"); } }

27th May 2022, 4:07 AM
We Doru
We Doru - avatar
3 Antworten
+ 2
You have to create it based on that clase.. Classnane myObj = new Classname(); /
27th May 2022, 4:33 AM
Cristian Baeza Jimenez
Cristian Baeza Jimenez - avatar
+ 1
An object is an unit of structured data with the class as a template.
27th May 2022, 4:23 AM
Emerson Prado
Emerson Prado - avatar
0
Okay just tell me which one is object here in the Above Block Of Code.
27th May 2022, 4:25 AM
We Doru
We Doru - avatar