Class Attributes (Lesson-26)

Previously, you studied about creating classes and creating objects from those classes. But the class we took for an example contained only one method. Actually, the classes contain attributes and methods. Attributes are actually variables that reside in the class and are particular to the class and methods are methods which perform actions on those … Read more Class Attributes (Lesson-26)

Multidimensional Arrays (Lesson-22)

An array of arrays is called a multidimensional array. Let’s start with a simple two dimensional array. A two dimensional array is defined as follows: DataType[][] arr; For example: int[][] iArray; To initialize a multidimensional array, place each array within its own set of brackets: int[][] iArray={ {2,3,6} , {6,2,9} }; The above array is … Read more Multidimensional Arrays (Lesson-22)