Create a program called \"Testl.java\" that should have a main method that does
ID: 3926518 • Letter: C
Question
Create a program called "Testl.java" that should have a main method that does the following creates a new ArrayList that will hold dates -Tell your ArrayList to add(a new date that is 1/1/2015) Tell your ArrayList to add(a new date that is 10/20//2015) Tell your ArrayList to add(a new date that is 7/5/2015) Tell your ArrayList to add(a new date that is 6/15/2015) Tell your ArrayList to add(a new date that is 9/3/2015) prints your Arraylist prints how many of the dates in the ArrayList are during Monsoon Season. The monsoon season in Arizona starts on june 17 and continues through the end of September Your main method should go through the ArrayList and count the number of dates that are during the monsoon season print that number.Explanation / Answer
Answer:-
class Test1
{
public static void main(String[ ] args)
{
ArrayList al = new ArrayList( );
al.add("1/1/2015");
al.add("10/20/2015");
al.add("7/5/2015");
al.add("6/15/2015");
al.add("9/3/2015");
System.out.println(al); // It will prints our ArrayList
}
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.