- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Karthikeya Boyini has Published 2383 Articles
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
202 Views
Let’s say the following is our Map −Mapmap = new HashMap(); map.put("1", "A"); map.put("2", "B"); map.put("3", "C");Make it read-only using the unmodifiableMap() method −map = Collections.unmodifiableMap(map);Example Live Demoimport java.util.Collections; import java.util.HashMap; import java.util.Map; public class Demo { public static void main(String[] argv) throws Exception { Mapmap = ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
168 Views
Let’s say the following is our Map with unsorted keys −HashMapmap = new HashMap(); map.put("1", "A"); map.put("6", "B"); map.put("3", "C"); map.put("7", "D"); map.put("5", "E"); map.put("2", "F"); map.put("4", "G"); map.put("8", "H");Now, sort the above Map. The result of tMap below would be a sorted map by key −MaptMap = new TreeMap(map);Example Live ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
78 Views
Before getting into an example, we should know what ConcurrentLinkedDeque is, it is unbounded deque based on linked nodes. Multiple threads can access deque elements with safety.This example demonstrates about How to use pollLast() in android ConcurrentLinkedDequeStep 1 − Create a new project in Android Studio, go to File ⇒ ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
2K+ Views
You can use INFORMATION_SCHEMA.COLUMNS to check if a database is empty or not. The syntax is as follows −SELECT COUNT(DISTINCT `TABLE_NAME`) AS anyAliasName FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `table_schema` = 'yourDatabaseName';The above syntax returns 0 if the database has notable otherwise it returns the number of tables. For our example, we are ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
113 Views
Let’s say we have the following SortedSet −SortedSet set = new TreeSet(); set.add("T"); set.add("R"); set.add("S"); set.add("Q"); set.add("V"); set.add("U"); set.add("W");Now, after displaying the above elements with Iterator, you can insert values like this to a SortedSetset.add("Z"); set.add("Y");Example Live Demoimport java.util.Iterator; import java.util.SortedSet; import java.util.TreeSet; public class Demo { public static void ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
20K+ Views
AVL tree is a self-balancing Binary Search Tree where the difference between heights of left and right subtrees cannot be more than one for all nodes.Tree rotation is an operation that changes the structure without interfering with the order of the elements on an AVL tree. It moves one node ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
83 Views
Before getting into an example, we should know what arrayblockingqueue is, it travels FIFO manner and the first element going to live the longest period of time and last element of the queue going to live a short period of the time.This example demonstrates about How to use pool() ArrayBlockingQueue ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
162 Views
Read-only Hashtable would mean users won’t be able to add or remove elements from it. Let us first create a Hashtable with key-value pair −Hashtablehash = new Hashtable(); hash.put("1", "A"); hash.put("2", "B"); hash.put("3", "C"); hash.put("4", "D"); hash.put("5", "E"); hash.put("6", "F"); hash.put("7", "G");Now, use unmodifiableMap() to form a Hashtable read-only −Mapm ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
484 Views
To get total in the last row of MySQL result, use the following syntax −( SELECT yourColumnName1, yourColumnName2, yourColumnName3, . . N FROM yourTableName ) UNION ( SELECT "yourMessage" AS anyAliasName1, SUM(yourColumnName1) AS anyAliasName2, SUM(yourColumnName2) AS anyAliasName3, . ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
69 Views
Before getting into an example, we should know what ConcurrentLinkedDeque is, it is unbounded deque based on linked nodes. Multiple threads can access deque elements with safety.This example demonstrates about How to use pop() in android ConcurrentLinkedDequeStep 1 − Create a new project in Android Studio, go to File ⇒ ... Read More