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<Vehicle> vehicles = new TreeSet <> ();
vehicles.add(new Vehicle (10123, "Ford"));
vehicles.add(new Vehicle (10124, "BMW"));
System.out.println(vehicles);
What is the result?
jduarte
Highly Voted 3 years, 2 months agoshivkumarx
Most Recent 4 months agoasdfjhfgjuaDCV
4 months, 1 week agosteefaand
5 months, 2 weeks agoiSnover
5 months, 3 weeks agor1muka5
1 year, 4 months agoWilsonKKerll
2 years, 4 months agobnagaraja9099
3 years, 2 months agoInnovation
4 years, 6 months agoshivkumarx
4 months agoM_Jawad
4 years, 6 months agoadnano1234
4 years, 6 months ago