- 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
8K+ Views
Yes, we can declare a try-catch block within another try-catch block, this is called nested try-catch block.Nested Try-Catch BlockIf an inner try statement does not have a matching catch statement for a particular exception, the control is transferred to the next try statement catch handlers that are expected for a matching ... Read More
raja
3K+ Views
The length is an instance variable of an array in Java whereas length() is a method of String class.lengthAn array is an object that holds a fixed number of values of the same type.The length variable in an array returns the length of an array i.e. a number of elements ... Read More
raja
2K+ Views
Double-buffering is the process of drawing graphics into an off-screen image buffer and then copying the contents of the buffer to the screen all at once.For the complex graphics, using double-buffering can reduce flickering issues.Java Swing automatically supports double-buffering for all of its components.Double-buffering is memory intensive, its use is ... Read More
raja
769 Views
In Java, it is possible to define a class inside another class, such classes are called Nested classes. We can use the access modifiers like private, public, protected or default for inner classes and default or public access modifiers for outer class.There are two types of nested classes are defined in ... Read More
raja
1K+ Views
The java.lang.ClassCastException is one of the unchecked exception in Java. It can occur in our program when we tried to convert an object of one class type into an object of another class type.When will be ClassCastException is thrownWhen we try to cast an object of Parent class to its Child class type, this exception ... Read More
raja
1K+ Views
Any method that is declared as final in the superclass cannot be overridden by a subclass. If we try to override the final method of super class we will get an error in Java.Rules for implementing Method OverridingThe method declaration should be the same as that of the method that is to be ... Read More
raja
9K+ Views
Yes, we can declare a constructor as private. If we declare a constructor as private we are not able to create an object of a class. We can use this private constructor in the Singleton Design Pattern.Conditions for Private ConstructorA private constructor does not allow a class to be subclassed.A private ... Read More
raja
4K+ Views
Yes, It is allowed to define a method with the same name as that of a class. There is no compile-time or runtime error will occur. But this is not recommended as per coding standards in Java. Normally the constructor name and class name always the same in Java.ExampleLive Demopublic class ... Read More
raja
185 Views
The String class objects are immutable whereas the StringBuffer and the StringBuilder objects are mutable.A StringBuffer is synchronized while a StringBuilder is not synchronized.A Concatenation operator "+" is internally implemented using either StringBuffer or StringBuilder.If the Object value is not going to change use String Class because a String object ... Read More
raja
634 Views
A thread-safe class is a class that guarantees the internal state of the class as well as returned values from methods, are correct while invoked concurrently from multiple threads.The HashMap is a non-synchronized collection class. If we need to perform thread-safe operations on it then we must need to synchronize ... Read More