Suppose, we want to perform addition of two numbers in our program. We can directly add 5+5. But, in program first we need to store these values somewhere in order to use it throughout our code. We need to store these values in our memory space. Here, variable act as a container  which is a … Continue reading Variables


Anatomy of a class

Earlier we discussed about how java program executes. Here we will learn what happens when we run a java program. When the JVM starts running it - It looks for the class we give it at the command line. Then it starts looking for a specially-written method that looks exactly like:         … Continue reading Anatomy of a class

Requirements to run Java

Before we discuss what are the basic requirements to run java file we need to know how java works. Suppose, we write a Java program (on any platform). First, we need to compile the program. Therefore, JVM compiler (called javac) generates a byte code (bytecode files use the extension .class). However, bytecode is not … Continue reading Requirements to run Java

Features of Java

  Simple: It uses C++ syntax. It has Automatic garbage collection. It has no pointers (Explicit). Object-Oriented: It deals with objects which has data and methods. Java can be easily extended since it is based on the Object model. Includes basic concepts of OOPs: (will learn all these terms in further tutorials). Portable: Byte-code can … Continue reading Features of Java