Listing 7 demonstrates code to get a new instance of the Calendar class, obtain the hour of the day (which is returned in a 24-hour format), and then put together a simple greeting based on that hour.
清单7给出了获得calendar类新实例的代码,从而得到一天中的具体时间(以24小时的格式返回),然后根据这个时间组合出一条简单的欢迎词。
We will make our friends feel warm by a simple greeting "Hello. How are you?". We will reduce their trouble by answering their questions patiently and kindly.
一句简单的问候就会温暖人心,耐心友善的回答别人的问题就会减少别人的麻烦。
We will make our friends feel warm by a simple greeting "Hello. How are you?". We will reduce their trouble by answering their questions patiently and kindly.
一句简单的问候就会温暖人心,耐心友善的回答别人的问题就会减少别人的麻烦。
应用推荐