import java.time.LocalDate; import java.util.*; public class DateAndTime { public static String findDay(int month,int day,int year){ return LocalDate.of(year, month, day).getDayOfWeek().toString(); } public static void main(String[] args) { Scanner sc=new Scanner(System.in); int mon...
publicstaticStringfindDay(intmonth,intday,intyear){Calendarcal=Calendar.getInstance();cal.set(Calendar.MONTH,month-1);cal.set(Calendar.DAY_OF_MONTH,day);cal.set(Calendar.YEAR,year);returncal.getDisplayName(Calendar.DAY_OF_WEEK,Calendar.LONG,Locale.US).toUpperCase();} Not really. Suposed that ...
开发者ID:rshaghoulian,项目名称:HackerRank_solutions,代码行数:21,代码来源:Solution.java 示例2: updateSelectedDates ▲点赞 3▼ importjava.time.LocalDate;//导入方法依赖的package包/类privatevoidupdateSelectedDates(){ List<LocalDate> dates =newArrayList<>(); LocalDate start = getSkinnable().getPa...
开发者ID:rshaghoulian,项目名称:HackerRank_solutions,代码行数:21,代码来源:Solution.java 示例2: showPerson ▲ importjava.time.LocalDate;//导入方法依赖的package包/类@FXMLpublicvoidshowPerson(Person person){if(person ==null) { firstNameLabel.setText(""); lastNameLabel.setText(""); cityLabel.s...
开发者ID:rshaghoulian,项目名称:HackerRank_solutions,代码行数:21,代码来源:Solution.java 示例2: split ▲点赞 3▼ importjava.time.LocalDate;//导入方法依赖的package包/类/** * Splits the given period into multiple slices of one month long. ...
开发者ID:MohamedSondo,项目名称:ACE_HackerRank,代码行数:21,代码来源:Solution.java 示例2: calcDiasTrabUltimoMes ▲点赞 3▼ importjava.time.LocalDate;//导入方法依赖的package包/类/** * Calcula o total de dias trabalhos no último mês
importjava.time.LocalDate;//导入方法依赖的package包/类publicstaticvoidmain(String[] args){/* Read and save input as LocalDates */Scanner scan =newScanner(System.in); LocalDate returnDate = readDate(scan); LocalDate expectDate = readDate(scan); ...