This category contains all the posts under core java and ways to program in Java

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

Understanding Classes in Java

Introduction After gathering some insight into Java Reference Types in the previous posts, now understanding classes in Java has become easier. We need to understand how a Reference Type comes to existence and more. Apart from that we must also learn about Interfaces and Enums which are the building blocks of any written program. A Class in Java A class declaration defines a new reference type and describes its implementation. A class contains members which are enclosed in the body of the class. Members may also be inherited from a Super Class or Interfaces. A member can be a field, a...
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