Up to now you have always used sout with objects that you created in the class or transferred to it (or its method (main e.g.). So you have created it by yourself: (ExampleClass variablename= new ExampleClass(); )and this object was availible after that.
Now you don't have to make it . It's STATIC - always availible - you can use it everytime and everywhere.
I
interface Dream {
private static Hobby HOBBY = new Hobby(); //this is the moment of creation... a long time ago....and now you can use , use, and use it.
no matter where you want to do it.
}
0
This website uses cookies to provide you with personalized service. By using this website, you agree to our use of cookies. If you require more details, please read our Terms and Policy.