JavaRush /Java Blog /Random EN /Unique name for an object djigurda71 Level 28 28 February 2021 52 views 0 comments Unique name for an object Published in the Random EN group Join You need to create a unique name for each object in the loop. Sample code: for(int i = 0; i < 10; i++) { Cat ? = new Cat(); } I can’t figure out how to implement a unique name for each cat using a loop? Comments TO VIEW ALL COMMENTS OR TO MAKE A COMMENT, GO TO FULL VERSION
GO TO FULL VERSION