← Back to Question List
Java Code Walkthrough #13
Basic If-Else Chain
📄 Code
Read carefully — what does this print?1public class Main {2 public static void main(String[] args) {3 int score = 72;4 if (score >= 90) {5 System.out.println("A");6 } else if (score >= 80) {7 System.out.println("B");8 } else if (score >= 70) {9 System.out.println("C");10 } else {11 System.out.println("F");12 }13 }14}