Jul 4 2010

Java Tips: The Binary String Concatenation Operator

Java Programming: The Binary String Concatenation Operator + The binary operator + is overloaded in the sense that the operation performed is determined by the type of the operands. When one of the operands is a String object, the other operand is implicitly converted to its string representation and string concatenation is performed. Non-String operands [...]

Jun 24 2010

Object Reference Variables in Java Language Programming

Object Reference Variables An object reference is a value that denotes an object in Java. Such reference values can be stored in variables and used to manipulate the object denoted by the reference value. A variable declaration that specifies a reference type (i.e., a class, an array, or an interface name) declares an object reference [...]

Jun 23 2010

Java Program Language: Declaring and Initializing Variables

Java Language Program: Variable Declarations A variable stores a value of a particular type. A variable has a name, a type, and a value associated with it. In Java, variables can only store values of primitive data types and references to objects. Variables that store references to objects are called reference variables. Declaring and Initializing [...]

Jun 13 2010

Java Programming: Building New Classes

Java Programming Tutorials: There are two fundamental mechanisms for building new classes from existing ones: inheritance and aggregation. It makes sense to inherit from an existing class Vehicle to define a class Car, since a car is a vehicle. The class Vehicle has several parts; therefore, it makes sense to define a composite object of [...]

Jun 12 2010

Java Programming Tips: Terminology for Class Members

Are you new to Java Programming? Here are some popular terminology used for class members. Hope you learn something new today. Instance Members These are instance variables and instance methods of an object. They can only be accessed or invoked through an object reference. Instance Variable A field that is allocated when the class is [...]