V
Vikram
Hi All,
I have an anonymous inner class in my code which is getting
called in a for loop as below:
Class X{
public Image getImage() {
return new Image() {
.........
..........
}
}
}
I have a client code which calls the method getImage() in a for loop
as below.
X x = new X();
for(int i=0;i<100;i++){
Image im = x.getImage();
}
Is there any performance isses if we use the anonymous classes this
way? The reason I thought of using is I am not changing the Image
class further, just using the values.
I have an anonymous inner class in my code which is getting
called in a for loop as below:
Class X{
public Image getImage() {
return new Image() {
.........
..........
}
}
}
I have a client code which calls the method getImage() in a for loop
as below.
X x = new X();
for(int i=0;i<100;i++){
Image im = x.getImage();
}
Is there any performance isses if we use the anonymous classes this
way? The reason I thought of using is I am not changing the Image
class further, just using the values.