core java

Interface Declarations in Java

Introduction The previous post introduced Class Declarations in Java and it is the obvious next step to understand the Interface Declarations in Java after that. So, here is an insight to Interfaces in Java. Interfaces are considered as the way to achieve multiple inheritance in Java. We will certainly talk about that part in the coming sections. This post will introduce you to Interfaces and will also mention about the Annotations, which are different categories of interfaces and an important feature of the language. Multiple Inheritance Multiple Inheritance is a language construct w...
Read More

Class Declarations in Java

Introduction As promised here is the continuation of Understanding Java Classes. We will mostly discuss about the production rule for Class Declarations in Java. If you recall, in the previous post I mentioned about the below rule: NormalClassDeclaration: ClassModifiersopt class Identifier TypeParametersopt Superopt Interfacesopt ClassBody Do not worry, if you have no idea about what production rules of a grammar are. I will define them below and we do not need to know that as I will explain things in simple words. :) Dissecting the Production If you look at the above definition, we have...
Read More

The Details of Object Class in Java

Introduction With some clarity in the Type Definition in Java, now it is time to know some details of the language. If you missed the critical posts in this series, please visit the link More about reference types in Java. In this post, I trust that you have knowledge about what I wrote in the above link. We will primarily discuss some core classes and their properties in the language. The Object class This Object class is a super class for all other classes. Please note that it is a super class only for all the classes, there are times when people get confused or have doubts if the inte...
Read More

More about Reference Types in Java

Introduction This post is about the Reference Types in Java and it is a continuation of the post Learning Java the Right Way. In the previous post we discussed about the Reference Types and Values. We will continue that discussion further. Also, the Java programming language has a lot to offer in terms of Generics, where it becomes almost mandatory to understand about the Types in detail. Type Declaration Identifiers and Type Names Now on, whenever we talk about the Types it would mostly be the Reference Types in Java. As Java is an object oriented language, even the primitive types h...
Read More

Learning Java the Right Way

Introduction It's been long that I read the Java® Language Specification Java SE 6 Edition but never thought of writing any post on that. Recently I started reading the Java® Language Specification Java SE 7 Edition and here I present my learning. This series is an effort for learning java the right way. directly from the source. It is the best practice, to learn a language from its specification. But most of the time when someone starts with the JLS, they get repelled by the first three chapters of the JLS, which is mostly about the Grammar and Lexical Structure of the Language. It mostly...
Read More

Object Oriented Programming – Inheritance in detail

Introduction This article is in relation to the interview questions asked to the java candidates in particular. I have been interviewing candidates and I find them very confused between the features of OOP. Most of the time people are not very clear about Inheritance. We will discuss this in detail. To read more about my articles on java and it's concepts, please visit Java Articles. Purpose of the article This article is for the novice and the experts as well, I always believe that the concepts are something which has to be read and brushed up again, here we will discuss Inheritance in d...
Read More