New operator is used to create a new object of an existing class and associate the object with a variable that names it. Basically new operator instantiates a class by allocating memory for a new object and returning reference t...
Sunday, December 28, 2014
Monday, May 26, 2014
How to Define Methods with Behavior: Java
Objects have behavior that is implemented by its methods. Other objects can ask an object to do something by invoking its methods. This section tells you everything you need to know about writing methods for your Java classes.
I...
How to Declare Member Variables in Classes: JAVA
A class’s state is represented by its member variables. You declare a class’s member variables in the body of the class. Typically, programmer declare a class’s variables before you declare its methods, although this is not requi...
Sunday, May 18, 2014
How to Declare Classes with Members: JAVA
In order to bring a class into existence in Java program, it should be declared. A class is declared using keyword class. The generic syntax for class declaration in Java is:
Class <class_name>{ Statements defining class co...
How to Implement Object Oriented Design in JAVA
The basic unit of object-orientation in Java is the class. The class is often is described as a blueprint for an object. You can think of an object as an entity having a unique identity, characteristics and behaviour. For instanc...
Null Statement and Character Manipulation in JAVA
In Java programs, statements are terminated with a semicolon (;). The simplest statement of them all is the empty, or null statement.
; it is a null statement
A null statement is useful in those instances where the syntax of the...