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
Joseph Nickalo
432 PointsUsing multiple windows during videos
Hello, I´m just wondering why in the videos does the guy use multiple windows when coding? Like those videos where he used one window called Example and another called PezDispenser I think it was. Why can´t he just use one window? It confuses me and my notes haha
1 Answer
Brian Pedigo
26,786 PointsThose two windows are two different java files. The Example.java file contains a class called Example and the key word "main" which is where program starts from. The PezDispenser.java has another class called PezDispenser and is were he is building out methods and variables to mimic the real life functions of a Pez Dispenser. But to answer your question "Why can't he just use one window". Truth is he could have chosen to use one window or file. However, that is not how Java is traditionally written out.