Could you guys entertain a few questions?
I have written a few posts to this forum and as I said before, I am a newbie to programming, as far as programming languages is concern. Recently I purchased the “Java, The Complete Reference” and I must admit it is addictive, at least for me. I just finished chapter eight, inheritance, and I have a few random questions for you guys.
1. I understand the difference between default, public, private and protected, but how much use does “private” and or “protected” gets in real world? Could you guys give me a few examples of when it is convenient to use one over the other?
2. Also, maybe I am a bit confused, but I keep reading about people writing malicious code which could affect a program I might write, but doesn’t the fact that programs are compiled into Java bytecode help to avoid the problem of people opening up and reading the program code?
3. Would it be wise for me to begin, whenever I am ready, writing all my programs as public and as the need arises and I feel more comfortable begin using “private”?
4. Also, I read some of the other posts and I noticed that some of you keep referring to the “How to program in Java” by DIETEL. Is this a must have book? I want to learn the language and eventually (as soon as possible) get certified because I really like it, and while I don’t mind spending money on a worthy cause or item, I don’t want to go broke purchasing every other book on the same subject.
I really appreciate the fact that you guys take the time to help people like me. Thanks in advance for your help and patience. Hopefully one day in the not too distant future I’ll be able to submit postings that are up to par with your. Thanks again.
Bookmarks