
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 10744 Articles

AmitDiwan
107 Views
Following is an example to implement Pair class from Unit class in Java −Exampleimport org.javatuples.Unit; import org.javatuples.Pair; public class MyDemo { public static void main(String[] args) { Unit unit = Unit.with("Tutorial"); System.out.println("Unit class element: " + unit); Pair pair = ... Read More

AmitDiwan
652 Views
To sort an ArrayList, you need to use the Collections.sort() method. This sorts in ascending order, but if you want to sort the ArrayList in descending order, use the Collections.reverseOrder() method as well. This gets included as a parameter −Collections.sort(myList, Collections.reverseOrder());Following is the code to sort an ArrayList in descending ... Read More

AmitDiwan
93 Views
At first create Septet and add elements −Septet septet = new Septet( "Laptop", "Desktop", "Tablet", "Notebook", "Phone", "Reader", "LCD");Now, implement Octet from Septet −Octet octet = septet.add("LED");Following is an example to implement Octet class from Septet class in Java −Exampleimport org.javatuples.Septet; import org.javatuples.Octet; public class MyDemo { ... Read More

AmitDiwan
91 Views
Following is an example to implement Ennead class from Octet class in Java −Exampleimport org.javatuples.Octet; import org.javatuples.Ennead; public class MyDemo { public static void main(String[] args) { Octet octet = new Octet( "Jack", "Tom", "Steve", "Tim", "Nathan", "Ryan", ... Read More

AmitDiwan
119 Views
Following is an example to implement Decade Class from Ennead Class in Java using JavaTuples −Exampleimport org.javatuples.Decade; import org.javatuples.Ennead; public class MyDemo { public static void main(String[] args) { Ennead e = Ennead.with("Katie", "Tom", "Ryan", "Tom", "Bradley", "David", "Steve", "Brad", "Jacob"); ... Read More

AmitDiwan
9K+ Views
To sort TreeSet in descending order, use the descendingSet() method in Java.The descendingSet() method is used to return a reverse order view of the elements contained in this set.At first, create a TreeSet −TreeSet treeSet = new TreeSet();Then add some elements −treeSet.add(45); treeSet.add(15); treeSet.add(99); treeSet.add(70);Sort them indecreasing order −TreeSet res = (TreeSet)treeSet.descendingSet();Following ... Read More

AmitDiwan
2K+ Views
To sort HashSet in Java, you can use another class, which is TreeSet.Following is the code to sort HashSet in Java −Example Live Demoimport java.util.*; public class Main { public static void main(String args[]) { Set hashSet = new HashSet(); hashSet.add("green"); ... Read More

AmitDiwan
83 Views
The HTML DOM table deleteTFoot() method delete the element from the table in an HTML document.SyntaxFollowing is the syntax −object.deleteTFoot()Let us see an example of HTML DOM table deleteTFoot() method −Example Live Demo body { color: #000; background: lightblue; ... Read More

AmitDiwan
74 Views
The HTML DOM table deleteCaption() method delete the first element from the table in an HTML document.SyntaxFollowing is the syntax −object.deleteCaption()Let us see an example of HTML DOM table deleteCaption() method −Example Live Demo body { color: #000; background: lightblue; ... Read More

AmitDiwan
238 Views
The HTML DOM table insertRow() method generates an empty element and adds it to the table in an HTML document.SyntaxFollowing is the syntax −object.insertRow(index)Here, index represent a number that specifies the position of the row to insert.Let us see an example of HTML DOM table insertRow() method −Example Live Demo ... Read More