Given:
class Vehicle {
int vno;
String name;
public Vehicle (int vno, String name) {
this.vno = vno,;
this.name = name;
}
public String toString () {
return vno + '':'' + name;
}
}
and this code fragment:
Set
vehicles.add(new Vehicle (10123, ''Ford''));
vehicles.add(new Vehicle (10124, ''BMW''));
System.out.println(vehicles);
What is the result?
Blondell
14 days agoBrandon
17 hours agoVan
17 days agoAntonio
18 days agoGenevieve
20 days ago