user100DaysOfCode
CommunityDevTermsResources|Login

Loading

Java Roadmap

Day 15: ArrayList

Write a program which performs the following tasks:
  • Initialise an ArrayList named weekdays which contains strings from Monday to Sunday
  • Print all the elements in the ArrayList weekdays
  • Sort the elements of weekdays alphabetically in increasing order and print them again
  • Sort the elements of weekdays alphabetically in decreasing order and print them again
  • Write a function that takes an ArrayList and a charater as parameters and removes all the elements from the arraylist that start with the given character. For example: if the parameters are weekdays and the charater 't', then Tuesday and Thursday should be removed from the arraylist weekdays
<Prev|Next>

Learning Resources |View Complete Plan

Day 15 - ArrayList

Write a program which performs the following tasks:
  • Initialise an ArrayList named weekdays which contains strings from Monday to Sunday
  • Print all the elements in the ArrayList weekdays
  • Sort the elements of weekdays alphabetically in increasing order and print them again
  • Sort the elements of weekdays alphabetically in decreasing order and print them again
  • Write a function that takes an ArrayList and a charater as parameters and removes all the elements from the arraylist that start with the given character. For example: if the parameters are weekdays and the charater 't', then Tuesday and Thursday should be removed from the arraylist weekdays
<Prev|Next>

Learning Resources |View Complete Plan

      Sponsor Us|Community|Blog|YoutubeCareersContact UsDisclaimerPrivacy PolicyTerms of Service
      Have Feedback or want to contribute? Email: hello[@]100DaysOfCode.io
      100DaysOfCode@2024