simple java code
java\n// AC: Runtime: 1 ms, faster than 63.13% of Java online submissions for The Number of Full Rounds You Have Played.\n// Memory Usage: 37.2 MB, less than 74
```java\n// AC: Runtime: 1 ms, faster than 63.13% of Java online submissions for The Number of Full Rounds You Have Played.\n// Memory Usage: 37.2 MB, less than 74.19% of Java online submissions for The Number of Full Rounds You Have Played.\n// .\n// T:O(len(startTime) + len(finishTime)), S:O(1)\n//\nclass Solution {\n    public int numberOfRounds(String startTime, String finishTime) {\n        String[] arr1 = startTime.split(":"), arr2 = finishTime.split(":");\n        int hour1 = Integer.parseInt(arr1[0]), minute1 = Integer.parseInt(arr1[1]), hour2 = Integer.parseInt(arr2[0]), minute2 = Integer.parseInt(arr2[1]);\n        if (hour1 > hour2 || (hour1 == hour2 && minute1 > minute2)) {\n            hour2 += 24;\n        }\n        int ret = 0;\n        // gap at least one hour\n        if (hour2 - hour1 >= 1) {\n            ret += (hour2 - hour1 - 1) * 4;\n            ret += (60 - minute1) / 15 + minute2 / 15;\n        }\n        // in same hour, compare minute.\n        // notice if minute2 % 15 != 0 and ret > 0, will cause one quarter invalid.\n        else {\n            ret += (60 - minute1) / 15 - (60 - minute2) / 15;\n            if (ret > 0 && minute2 % 15 != 0) {\n                ret -= 1;\n            }\n        }\n\n        return ret;\n    }\n}\n```
['Java']