What is transient keyword in Java?

java-thumbnail

This article explains about the transient variable and when it will be used in the Java programming. Another important fact is that, this question is most frequently asked in the Java interviews for checking the basic knowledge of a programmer. Another point is that this keyword is not frequently used by programmer in the normal […]

Ordering Queue Using Comparator Interface and PriorityQueue

java-thumbnail

The basic use of Queue class is to provide a data structure which allows storing objects in a First in First out(FIFO) format. But sometimes one wants to maintain the ordering, based on some other metric. This is exactly the purpose of PriorityQueue, another Queue implementation. You provide it a Comparator, and it does the […]

Circular Linked List in Java

java-thumbnail

Had to implement a circular linked list recently. Here’s my take, suggestions are welcome. The list can be parameterized for any type which has a meaningful equals method defined. The main method shows a sample usage of the Circular linked list with the String type. Only add, remove and size method are implemented. also read: […]

Sample code for SimpleDateFormat

java-thumbnail

also read: Java Tutorials Java EE Tutorials Design Patterns Tutorials Java File IO Tutorials

Sample code for Listing file names in a directory

java-thumbnail

also read: Java Tutorials Java EE Tutorials Design Patterns Tutorials Java File IO Tutorials

Handle exceptions in overriding methods

java-thumbnail

The question why makes any topic makes more clearer and interesting than just to know about what the concept is. The rule about exceptions when we use them in overriding is: If super class method is throwing any exception(checked) and if we are overriding that method in sub class. also read: New Features in Java […]

Hiding and Overriding Methods In Java

java-thumbnail

Now in section Inheritance mainly in Hiding And Overriding Methods can we predict the output of the following program? also read: Java Tutorials Java EE Tutorials Design Patterns Tutorials Java File IO Tutorials It Prints: Here the overriding methods getX and getY in class RealPoint have the same return types as the methods of class […]

Static keyword in Java

java-thumbnail

What is Static? static variables and static methods might better have been called perClass variables and methods. They inherited this misleading terminology from C++. They are the opposite of instance variables and methods that work on a particular object. also read: Java Tutorials Java EE Tutorials Design Patterns Tutorials Java File IO Tutorials Can we […]

Inner Classes in Java

java-thumbnail

As we all know what an inner class is so lets try to know few more rules about Inner Classes. Inner classes cannot have static members. only static final variables. also read: Java Tutorials Java EE Tutorials Design Patterns Tutorials Java File IO Tutorials Interfaces are never inner. Static classes are not inner classes. Inner […]

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 […]