Answer the following questions as briefly (but completely) as possible:
Datefor the current time? How do you display the current time?
ArrayList<String> list = new ArrayList<String>(); list.add( "Denver" ); list.add( "Austin" ); list.add( new java.util.Date() ); String city = list.get( 0 ); list.set( 3, "Dallas" ); System.out.println( list.get(3) );
ArrayList listcontains duplicate elements. Does the following code correctly remove all
list? If not, correct the code.
for ( int i = 0; i < list.size(); i++ ) list.remove( element );
[1, 3]rather than
ArrayList<Integer> list = new ArrayList<Integer>(); list.add(1); list.add(2); list.add(3); list.remove(1); System.out.println( list );
java.util.Calendarclass, that represents the current moment in time?
c, how do you get its year, month, date, hour, minute, and second?
java.timeAPI, how can you add one month to a
LocalDateobject? How can you create a
LocalDateobject that represents the last Friday of the current month?
Email your homework assignment, by copy-and-paste (no attachments please), to (homework submission). If possible use the “text” and not the “HTML” mode of your email program. Please use the subject similar to “Java Programming I Homework Assignment #6 Submission”, so I can tell which emails are submitted homework assignments.
Confused? Send questions about the homework assignment to (homework questions). Please use a subject similar to “Java Programming I Homework Assignment #6 Questions” so I can tell which emails are questions about assignment quiz (and not submissions).