java - Why is the 2nd for loop is not running? -


class test {  public static void main(string args[]) {     tournament t = new tournament();     team t = new team();     t.getinfo2();     /*t.display2();     t.teamobject();*/     int teams = t.num_team;     int players;     team[] tarr = new team[teams];     (int = 0; < teams; i++) {         tarr[i] = new team();         tarr[i].getinfo1();         players = t.num_players;         player[] parr = new player[players];         (int j = 0; j < players; j++) {             parr[j] = new player();             parr[j].getinfo();         }     }  } 

why 2nd loop not running? there no compile time error or run time error. not able sort out problem.

the second loop executing intended. t.num_players 0 getting assigned players.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -