Please tell me how can  declare an array of object.

how to create a two dimentional array object of a class.
let,
class abc{
abc(){
is it posible--
abc ss=new abc[10][10]
please tell me how can declare an array object.

then always use String and don't consider
StringBuffer at the outset. 'best practices' need not
be seen as premature optimization. besides, if it is
abstracted, does not matter how it is stored
internallyNot sure I would agree with this example - a String is immutable, if I want to change the object then using a StringBuffer makes sense (conveys the intend, yada, yada, yada).
Although, I do agree with you that some optimizations are best practices and should be used. I also come from the old days when optimization was always on our mind. Also, I would not expect someone to do something like re-calculate a value every time it is needed instead of storing the value in a variable, just to avoid optimization.
I just think that the example of using a 1-dimensional array when a 2-dimentional array is a better representaion of the "real world" will both obscure the intention and compicate the code.

Similar Messages

Maybe you are looking for