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, 8 months agoshivkumarx
Most Recent 9 months, 1 week agoasdfjhfgjuaDCV
9 months, 3 weeks agosteefaand
10 months, 3 weeks agoiSnover
11 months, 1 week agor1muka5
1 year, 9 months agoWilsonKKerll
2 years, 9 months agobnagaraja9099
3 years, 8 months agoInnovation
4 years, 11 months agoshivkumarx
9 months, 1 week agoM_Jawad
4 years, 11 months agoadnano1234
4 years, 11 months ago