Discuss / Java / exerciese

exerciese

Topic source
public class Main {    public static void main(String[] args) {        int age = 6;        // primary student的定义: 6~12岁        boolean isPrimaryStudent = age >6&& age <12;        System.out.println(isPrimaryStudent ? "Yes" : "No");    }}

LIn

#2 Created at ... [Delete] [Delete and Lock User]

6~12岁,包含了6岁和12岁,所以是 大于等于6,小于等于12。


  • 1

Reply