This site requires JavaScript, please enable it in your browser!
Greenfoot back
FlyerX
FlyerX wrote ...

2013/6/28

Problems with Lists

FlyerX FlyerX

2013/6/28

#
-----------SOLVED----------- Hi!, I want to create a list with all roboters in the current world. But when i execute this code:
List<Roboter> RoboterList = getWorld().getObjects(Roboter.class);
i keep getting this error on the comiller:
cannot find symbol - class List
So how do i create lists in Greenfoot?
Zamoht Zamoht

2013/6/28

#
You have to import the List class first. In the top of your class you will see an import of Greenfoot. Under that place this: import java.util.List;
You need to login to post a reply.