Question

c) Create Main class • Create a new List of type MyLinkedList • Insert some alphabets...

c) Create Main class • Create a new List of type MyLinkedList • Insert some alphabets of the English Language to the list • Display all the alphabets in the List • Search for a particular alphabet in the List and print true or false • Sort the List and display it • Delete a node in the List and display the list • Insert alphabet to a particular position in the List and display it • Delete the List

(java )

0 0
Add a comment Improve this question Transcribed image text
Answer #1
import java.util.*;  
class Main{  
   public static void main(String args[]){  
      ArrayList<Character> alist=new ArrayList<Character>();  
      alist.add("f");
      alist.add("d");
      alist.add("c");
      alist.add("b");
      alist.add("a");
      alist.add("e");
  
      //displaying elements
      System.out.println(alist);
  
       System.out.println( list.contains("b") );
      
       
      Collections.sort(alist);
  
      //displaying elements
      System.out.println(alist);

  
 alist.remove("f");

System.out.println(alist);

alist.add(3, "n");

System.out.println(alist);

alist.clear();

System.out.println("list was deleted");

   }  
}
Add a comment
Know the answer?
Add Answer to:
c) Create Main class • Create a new List of type MyLinkedList • Insert some alphabets...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT