- 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
Raja has Published 760 Articles
raja
689 Views
A Treeset is a subclass of AbstractSet class and implements NavigableSet Interface. By Default, a Treeset gives an ascending order of output and it will use a Comparable interface for sorting the set elements. Inside a Treeset, we can add the same type of elements otherwise it can generate a ... Read More
raja
25K+ Views
An IllegalArgumentException is thrown in order to indicate that a method has been passed an illegal argument. This exception extends the RuntimeException class and thus, belongs to those exceptions that can be thrown during the operation of the Java Virtual Machine (JVM). It is an unchecked exception and thus, it ... Read More
raja
2K+ Views
Yes, we can override the start() method of a Thread class in Java. We must call the super.start() method to create a new thread and need to call run() method in that newly created thread. If we call the run() method directly from within our start() method, it can be ... Read More
raja
5K+ Views
Both Object level lock and Class level lock are used to achieve synchronization mechanisms in a multi-threaded application. Object Level Lock Every object in Java has a unique lock. If a thread wants to execute a synchronized method on a given object, first it has to get a lock of that object. ... Read More
raja
9K+ Views
The @Override annotation is one of a default Java annotation and it can be introduced in Java 1.5 Version. The @Override annotation indicates that the child class method is over-writing its base class method. The @Override annotation can be useful for two reasons. It extracts a warning from the compiler if the ... Read More
raja
2K+ Views
Yes, we can synchronize a run() method in Java, but it is not required because this method has been executed by a single thread only. Hence synchronization is not needed for the run() method. It is good practice to synchronize a non-static method of other class because it is invoked ... Read More
raja
6K+ Views
The Collection is an interface whereas Collections is a utility class in Java. The Set, List, and Queue are some of the subinterfaces of Collection interface, a Map interface is also part of the Collections Framework, but it doesn't inherit Collection interface. The important methods of Collection interface are add(), remove(), ... Read More
raja
2K+ Views
A HashMap is a subclass of AbstractMap class and it is used to store key & value pairs. Each key is mapped to a single value in the map and the keys are unique. It means we can insert a key only once in a map and duplicate keys are not ... Read More
raja
138 Views
A direct call of a Thread object's run() method does not start a separate thread and it can be executed within the current thread. To execute Runnable.run from within a separate thread, do one of the following. Construct a thread using the Runnable object and call start() method on the Thread. Define ... Read More
raja
516 Views
The toString() method is an important method of Object class and it can be used to return the string or textual representation of an object. The object class’s toString() method returns a string as the name of the specified object’s class which is followed by ‘@’ sign and the hashcode ... Read More