Discuss / Java / 就这点想了半天

就这点想了半天

Topic source

        int age = 9;

         //int z=12;

        // int x=6;

        // primary student的定义: 6~12岁

        boolean isPrimaryStudent = age<=12&&age>=6;

        System.out.println(isPrimaryStudent ? "Yes" : "No");


  • 1

Reply