Dlaczego wykonuje się pierwszy if z metody ship()? Kurs java z Codecademy. Jeżeli isFilled jest false powinien dać else chyba? Po uruchomieniu wyświetla taki tekst:
public static void main(String[] args) { // do not alter the main method! Order book = new Order(true, 9.99, "Express"); Order chemistrySet = new Order(false, 72.50, "Regular"); // tu wywołany jest pierwszy System.out.println(), wypisujący "High
Kod java
Dlaczego wykonuje się pierwszy if z metody ship()? Kurs java z Codecademy. Jeżeli isFilled jest false powinien dać else chyba?
Po uruchomieniu wyświetla taki tekst:
źródło: comment_beH6fn76JI8hucTjuYqD5cIGUAjYy3XJ.jpg
PobierzKtóry ma isFilled = true
public static void main(String[] args) {// do not alter the main method!
Order book = new Order(true, 9.99, "Express");
Order chemistrySet = new Order(false, 72.50, "Regular"); // tu wywołany jest pierwszy System.out.println(), wypisujący "High