Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Chance Crawford](https://secure.gravatar.com/avatar/08624ce14f1c28a06b08dc7e7d1a8db1?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Chance Crawford
4,824 PointsWhat does the "map" in map.OnMap do?
Is the "map" in the equation a new variable, or does it somehow compare the values of the previous map variable to the upcoming method OnMap?
1 Answer
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsThe "map" variable is created at the beginning of the Main routine by "Map map = new Map (8, 5);
" A few lines later, the "OnMap" method is called on it to determine if the Point object just created is valid ("on the map").
I'm not sure what you are referring to as the "previous map variable".
Chance Crawford
4,824 PointsChance Crawford
4,824 PointsOkay, so classes dont have to be declared public right? They are automaticall public and can be used across different files?
Steven Parker
230,688 PointsSteven Parker
230,688 PointsThe default access level for classes is internal, which means it can be used by any code in the same assembly. In this example, the entire program is one assembly.