Answer Posted / chandrarekha
Yes java supports multi dimensional arrays..care should be
taken while creating an array, as the array elements are
considered to be objects...we use new operator
int arr[][]=new int[3][]
arr[0]=new int[2];
arr[1]=new int[3];
arr[2]=new int[4];
the second dimension need not always have the same number
of elements.
| Is This Answer Correct ? | 11 Yes | 3 No |
Post New Answer View All Answers
What about method local inner classes or local inner classes in java?
What is the mapping mechanism used by java to identify IDL language?
What 4 doubled?
Define packages in java?
What are 5 boolean operators?
What is sortedset in java?
What makes a function well defined?
Say you want to store the information about a number of pets in an array. Typical information that you could store for each pet (where relevant) would be • Breed of animal • Animal's name • Its birth date • Its sex • Whether it has been sterilised or not • When it is due for its next inoculation • When it last had its wings clipped For each type of pet (eg. dog, cat or bird) you would typically define a class to hold the relevant data. Note: You do not need to implement these classes. Just answer the following questions. 3.1.1 What would be the advantage of creating a superclass (eg. Pet) and declaring an array of Pet objects over simply using an array of Objects, storing each of the instances of the different pet classes (eg. Dog, Cat or Bird) in it? 3.1.2 Would you define Pet as a class or as an interface? Why? (2) (2)
Can I extend singleton class in java?
What does string mean in java?
Why string objects are immutable in java?
What are exception handling keywords in java?
Can the garbage collection be forced by any means?
What are the library functions in java?
Difference between a process and a program?