Abstract keyword In Java

java-thumbnail

What is Abstract As we all know,An abstract method declaration introduces the method as a member, providing its signature, return type, and throws clause , but does not provide an implementation. Every subclass of A that is not abstract must provide an implementation for method, or a compile-time error occurs. also read: Java Tutorials Java […]

ThreadLocal in Java

java-thumbnail

ThreadLocal is one of the rarely used class in Java. I found it is one of the powerful class in Java on multi-threaded programming. In multi threaded program generally we use session object to track the current users information. also read: Java Tutorials Java EE Tutorials Design Patterns Tutorials Java File IO Tutorials These information […]

Why multiple inheritance is not allowed in Java?

java-thumbnail

For long time I had a question “why Sun introduced Interface concept instead of C++ style of multiple inheritance?“. I did googling but many articles and forums talks about difference between abstract class and Interface not why Interface concept required in Java. After extensive search and analysis I came to know the reason behind the […]

Call Java Oracle Functions From Java program

java-thumbnail

Call Java Oracle Functions From Java program Beginning with version 8i, the Oracle database includes a fully functional Java Virtual Machine, Oracle JVM. Out of this close relationship between Oracle and Java emerges an important technology for Oracle developers: Java stored procedures. With Java stored procedures, developers have the ability to harness the power of […]

StringBuilder class in Java 5.0

java-thumbnail

java.lang.StringBuilder StringBuilder class is introduced in Java 5.0 version. This class is replacement for the existing StringBuffer class. If you look into the operations of the both the classes, there is no difference. also read: New Features in Java 5.0 Generics in Java 5.0 Annotations in Java 5.0 If you are using StringBuilder, no guarantee […]

Chain Of Responsibility Pattern In Java

java-thumbnail

Chain Of Responsibility Pattern Overview: A method called in one class will move up a class hierarchy until a method is found that can properly handle the call.It consists of a source of command objects and a series of processing objects.Each processing object contains a set of logic that describes the types of command objects […]

Comparing Objects in Java

java-thumbnail

Comparing Objects in Java In Java comparing two value object is not straight forward. Here we will see how we can compare two value objects in Java. For that first we will create a value object called “MyValueObject”. This value object contains two properties. firstName lastName. Both the properties are of type string. also read: […]

Knowing about your Database

java-thumbnail

We use the Jdbc APIs for accessing the data from the database system. However, the different databases from different vendors will vary a lot in their underlying model and functionalities. For example, a feature supported in one database might not be supported in another database. So, even before working with a database, it is important […]

Customizing Dragging and Dropping for Swing Components

java-thumbnail

Swing’s Drop and Drop API can be used for customizing Drag and Drop support. For most of the commonly used components like Text Components, Color Chooser, File Chooser etc, the dropping support is enabled by default. We have to explicitly enable the dragging support by calling the setDragEnabled() method. Before getting into customizing them, let […]

Locking Files using Java

java-thumbnail

File Locking can be achieved in java by making use of the New I/O API (nio). Before the advent of New I/O API, there was no direct support in Java for locking a file. It is important to understand that File locking is hugely dependent on the native operating system on which the program is […]