Code:
public static FoodTruck getTruckByTruckId(int truckId){
FoodTruck course=new FoodTruck("","","","","");
fillCourseListFromFile();
for(int i=0;i<foodTruckList.size();i++){
if(foodTruckList.get(i).getTruckId()==(truckId)){
course=foodTruckList.get(i);
break;
}
}
return course;
}
I have an error in the following line string cannot be converted to int
The underlined value is an integer , how do I represent
an int in Java
FoodTruck course=new FoodTruck("","","","","" );
String represent " " Int represent ??
Comment