erreur avec affichage l'heure
bonjour mes amis ,j'ai un mesage d'erreur que je n'ai pas compris
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
Date date1=new Date();
DateFormat df = DateFormat.getDateInstance(DateFormat.LONG, Locale.getDefault());
System.out.println("date: "+df.format(date1));
Calendar calendar=Calendar.getInstance();
DateFormatSymbols dateSymb =new DateFormatSymbols(Locale.getDefault());
String days[]=dateSymb.getWeekdays();
System.out.println("Nous sommes le "+ days[calendar.get(Calendar.DAY_OF_WEEK)]+" "+df.format(date1));
DateFormat timeFormat=DateFormat.getTimeInstance();
System.out.println("Il est "+ timeFormat.format(date1)); |
"thread.java": reference to Date is ambiguous; both class java.util.Date in java.util and class java.sql.Date in java.sql match at line 46, column 5
"thread.java": reference to Date is ambiguous; both class java.util.Date in java.util and class java.sql.Date in java.sql match at line 46, column 20
"thread.java": cannot resolve symbol: class DateFormat in class aa.thread at line 48, column 11
"thread.java": cannot resolve symbol: variable DateFormat in class aa.thread at line 48, column 54
"thread.java": cannot resolve symbol: variable DateFormat in class aa.thread at line 48, column 27
"thread.java": cannot resolve symbol: class DateFormatSymbols in class aa.thread at line 53, column 11
"thread.java": cannot resolve symbol: class DateFormatSymbols in class aa.thread at line 53, column 43
"thread.java": cannot resolve symbol: class DateFormat in class aa.thread at line 58, column 11
"thread.java": cannot resolve symbol: variable DateFormat in class aa.thread at line 58, column 33
merci de bien vouloir m'aider