Okay, so I am trying to wrap my head around how to get stuff done with Java (I come from C++, Python, PHP etc.). I’m quite familiar with the language itself and OO principles, but less so familiar with building projects, stitching the dependencies together, and other aspects of the ritual and repetition that surrounds putting together a functioning Java program.
If you have resources to suggest (good tutorials etc.), I wholeheartedly encourage you to do so.
My question is this:
I have a new Eclipse project. I make a class, let’s say Guitar, that I want to use in another class in the same project, Musician (this is where my main() method resides). How do I import and use Guitar in the source for the Musician class?
There’s got to be something obvious I’m overlooking here, but I’ve tried a bunch of different things to no avail. Just tangling myself up into a mess. 🙂
Thanks for your help.
It is as simple as this. And since you are using eclipse you can do CTRL+SHIFT+O and it will auto-import the classes needed.