Java Compilation Unit


It is basically referred to a Java source code file, which forms the input for the Java compiler which is javac. This term is less commonly used among developers and it is technical jargon for Java source code file. This Java compilation unit has structure which is as follows - Some points about the compilation unit, these are somewhat based on... Continue Reading →

Java : Uses of this and super


In this post, I will list out possible uses of these two operators. Before that let me give brief details These are keywords having special semantic/meaning in language. Most uses are accessing the members or invoking the constructor. Uses of are valid within- Constructor, Instance initializer block, Instance initializer expression. Use in constructs than these are invalid and compiler will throw error accordingly. Uses... Continue Reading →

Initializing final member variables in Java


When you modify any variable declaration with final, you tell to compiler that once variable is initialized, its value cannot be changed.In other words, any further assignment of value is invalid attempt. While declaring variable as final , compiler also does some bytecode optimization as you might  have guessed they going to have only one... Continue Reading →

Variable initialization and default values


As discussed previous posts , we have seen various types of variables in Java. In this post, i am going to discuss about its initialization and default values. In Java, when variable is declared as field (static or instance variable inside class), then initialization of that variable is optional. In other words, while declaring field... Continue Reading →

Different types of variables in Java


As i discussed in last post there can be two types variables depending on value they store, such as reference and primitves. In this post i am going to discuss different types of variables depending on their scope. Following are the kinds of variables categorized according to their scope Static variables Instance variables Method local... Continue Reading →

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: