Me: Hi! Please check line 16 in the example in this place: https://codegym.cc/groups/posts/34-methods.
I think it's a mistake. I suppose you wanted to say System.out.println(canSecondTruckGo);
Thank you.
John: Hello!
Thanks for reaching out.
What exactly example have mistake? Can you indicate his number or do screenshot for me.
Me: Excuse me but this site don't me let paste one screenshot, besides the example have not a number. So, I'll write you the code. I think line 16 it is'nt well.
public static void main(String[] args) {
Truck first = new Truck();
first.weight = 10000;
Truck second = new Truck();
second.weight = 20000;
BridgeOfficer officer = new BridgeOfficer(15000);
System.out.println("Truck 1! Can I go, officer?");
boolean canFirstTruckGo = officer.checkTruck(first);
System.out.println(canFirstTruckGo);
System.out.println();
System.out.println("Truck 2! And can I?");
boolean canSecondTruckGo = officer.checkTruck(second);
System.out.println(canFirstTruckGo);
}
John: Please, leave your question in the help section and give me the link. I'll give it to the developers.