public void decendingArrayList()
{
ArrayList al=new ArrayList();
al.add(20);
al.add(30);
al.add(10);
al.add(3);
al.add(2);
al.add(5);
System.out.println("Initaily ArrayList:::::::::::: "+al);
Comparator comp=Collections.reverseOrder();
Collections.sort(al,comp);
System.out.println("Decending ArrayList::::::::::::::::: "+al);
}
Subscribe to:
Post Comments (Atom)
Spring Boot Config Server and Config Client.
In Spring cloud config we can externalise our configuration files to some repository like GIT HUT, Amazon S3 etc. Benefit of externalising ...
-
As we know that TreeSet by default store the unique value it doesn’t check case of the value that is being added. For example if...
-
We can extract text from pdf file using itext 2.1.6 PdfReader readerN = new PdfReader("pdfFilename"); OutputStream...
-
We mostly use hibernate ‘s sessionFactory.openSession() method which keeps track of all events of hibernate along with managing first ...
No comments:
Post a Comment