New Object Initialization in Java - Conclusion (
Page 4 of 4 )
Your lesson in how to initialize your very first object in a Java program has come to an end. We talked some theory, and took a look at some code, but the only way that you will know if you can do it is to go out and try it.
If you want you can give the coffee example a try, but that's really limited in usefulness for you as a programmer. Instead, I suggest you give making and initializing your own object a try.
If you do this, you will know whether you can create and not just imitate. Don't be scared, you know that you want to give it a try. So what are you waiting for? Open up your compiler and make yourself a program.
I'd like to mention one important point: I did not originally create the code examples I used. I adapted them from some work that came from an item posted on Java World in 1998.
You can view the original work online at http://www.javaworld.com/jw-03-1998/techniques/techniques.zip. All code snippets from this example come from the mind of the author of that example, and I wish to give credit where it is due.