M
Mayor Curley
Hi, All:
I need some help on Java as I go through my code to make it more solid.
In this for loop how many String objects are being created?
for(int i = 0; i < 1000000; i++) {
someMethod("stringX");
}
Now in this for loop how many String objects are being created?
for(int i = 0; i < 1000000; i++) {
someMethod("stringX");
someMethod("stringX");
someMethod("stringX");
someMethod("stringX");
someMethod("stringX");
}
Thanks,
Mayor
I need some help on Java as I go through my code to make it more solid.
In this for loop how many String objects are being created?
for(int i = 0; i < 1000000; i++) {
someMethod("stringX");
}
Now in this for loop how many String objects are being created?
for(int i = 0; i < 1000000; i++) {
someMethod("stringX");
someMethod("stringX");
someMethod("stringX");
someMethod("stringX");
someMethod("stringX");
}
Thanks,
Mayor