i am a beginner in java, hoping to be a good developer like some guys out there . I have read the SCJP book by kathy and bate, when i wanted to start developing softwares , i did not know where to start. I then, picked up the java 7 documentation API, but got stuck trying to use the swing package, am getting frustrated by my inability to move on, please can any one tell me what to do personally to get on programming effectively with java, what to study or how to study cos have read the SCJP book - first reading, I NEED HELP, and i will never forget anyone who will liberate me from this state of my frustration by advise and share experiences. Thanks
Hey .. take it easy.
Get into java & then start reading documentation & SCJP books.
Start with small documents... Type "Introduction to Java + PPT" on Google / or any other search engine. You will get many MS PPTs.
When you get interest in any subject then only you will go in depth of that subject.
The SCJP book is great, but it's not designed to help you learn Java from scratch, or to develop applications in it. It's to help someone who already knows Java to learn all the little details they need to get through the SCJP exam. You need to find a book that's aimed at beginners (or web sites aimed at a similar level). For example "Head First Java" by the same authors, or "Thinking in Java" by Bruce Eckel - you can see our book reviews for more.
oriakhi joseph wrote:got stuck trying to use the swing package
Well, as already said,
Dattatraya Tembare wrote:take it easy
Firstly, it might help if you describe what is your exact situation. How much experience (not job experience, but coding experience) do you have in programming? How much comfortable you are with any programming language, say C? How familiar you are with OO concepts? Are you uncomfortable just because there's something different with Java, or is it because Java is your first programming language?
If you read carefully, the preface of SCJP book says that this book is not to be used to learn Java from the scratch.
Btw, unless you get all building blocks in place (e.g logic constructs - loops, basic data structures, OO concepts etc.) don't go for other stuff like threading, swing, JDBC, xml parsing etc.
It is a learning process and it takes a little time(the word little is relative ). Be patient. Try to write very small programs (say a basic calculator - without GUI, or calculation of area/volume of different shapes etc.). Try to find flaws in your own code. The more flaws you find in your own code, better your logic becomes. Take a paper and pencil and start debugging programs with nested loops. This will help you in long run.
Also, "reading" books will only get you so far. You really need to start writing small programs by yourself. It will take a while before you will start to feel confident, especially if you are new to programming. Head First Java is a good book that introduces you to OOP, but I did find it a bit too light as far as actual code goes. Also, it doesn't really have any programming exercises, which hinders you from learning by doing. Still, it is an excellent book to get started with. I'd recommend this book: http://www.amazon.com/Introduction-Java-Programming-Comprehensive-8th/dp/0132130807
It is very well formatted, has lots of example code, and a lot of programming exercises at the end of each chapter. They provide a collection of the compiled exercise files, which can be examined by a good java Decompiler to provide solutions if you really get stuck coding one of the exercises. I've been reading through it recently and have been coding the difficult programs (marked with ** or ***) to ensure that everything I am learning "sticks". It is amazing how much you will learn when you actually have to write code independently. Reading code in a book is very easy to do, but you will very often gloss over some important details because you are passively reading the code.
Firstly get the basics right. There have been few books suggested, I would recommend Head First Java among those books.
Dont directly jump into areas like Swing/AWT. Creating GUI looks lucrative but its really not the place a beginner should start.
And as always you can browse through the threads in the forum to see if your queries have been previously asked, if not you can always post a new query.
I can relate. I can't tell you many times I became very frustrated and I was sure I just wasn't smart enough to learn this stuff. I recommend starting with Java for Dummies. I know the title is condescending, but it worked for me. And don't just read the code examples. Enter them, run them, and modify them. Do all the exercises at the end of each chapter. Don't try to start out using an IDE. Use an editor like Notepad++ and compile and run the examples from the command line. Only when you are comfortable with that should you graduate to using NetBeans or Eclipse.
It's already been mentioned that you shouldn't start out building GUI apps. Stick with console apps until you get the hang of things.
Hang in there and don't give up. It's all about perseverance.
"There is no reason for any individual to have a computer in his home" ~ Ken Olson, Co-founder of DEC, 1977
A lot of good advice has already been mentioned. Also surround yourself with Java programmers. Even learning Java from books and stuff, there will be blinders on your eyes until you surround yourself with people who regularly program in Java. They will mention things in front of you that you didn't even know existed, talk to you about different ways of programming, guide you in using APIs, etc.
Joined: Oct 06, 2011
thank you guys for your concern, i think i am ok in OOP concept (at least was an 'A' student in C++ course when i was in the university), i developed a CMS for my department using PHP as my degree project, so i think i have basic background in programming, though i accept the fact that i should take it easy, maybe am excpecting to be a java guru from myself like a breeze, but guys, i discovered the java tutorial site from sun for swing GUI with Netbeans IDE, is it ok for me to go with that? but i dont think i would know much of the code generated by the IDE.
Matthew Brown wrote:The SCJP book is great, but it's not designed to help you learn Java from scratch, or to develop applications in it.
In fact it's worse than that. Many of the examples in the SCJP book are examples of horribly bad Java code, which test your ability to understand the language. If you only used that book to learn Java, you might end up learning that you should write code just like those examples.
oriakhi joseph wrote:was an 'A' student in C++ course when i was in the university
If this is the case, then look no further than Core Java (Volume I & II) by Horstmann & Cornell. The book is very good and often discusses the design level differences in Java and C++. In fact Core Java book itself is a good demonstration of good programming and the book contains real life example (unlike those animal-cat-dog kind of examples). But again, the book is for serious programmers, so its ok if you don't get it in first reading. Let it take some time, but it is far better to learn good programming with real life examples during first learning itself. Even after reading it, you still feel choosy about best programming practices, then go for Effective Java by Bloch.
No offense meant to anyone, but if you are serious about programming and learning Java in general (instead of just clearing certifications), then do not rely on Sierra & Bates or Head First books. Those books are either very limited in scope, or very much focused on certification. If you want to clear the certification, then yes, you should refer those books.
Besides learning java, what do you want to do? What interests you?
Java (like C++) is huge, and covers an endless array of subjects - multimedia, database, filesystem, web applications ... do any of these have a particular interest?
The first OOP program I wrote was a file filter to convert HTML to plain text. It was a very simplistic approach, and it never worked as well as I hoped. But I learned much from the experience, because I had a task very specifically in mind when I went to start writing. I could tell when it was NOT doing what I wanted, which gave me the opportunity to learn why it failed, and what I'd need to do to make it work right.
Conversely, I've tried on a number of occasions to "create a web service" without much of an idea of what I wanted it to do. I just wanted experience writing a web service. That has NEVER worked out ... even when my web service did something, I learned next to nothing.
Find some simple task that you want to do, and try to write Java code to do it. You'll make mistakes, you'll figure out what went wrong, you'll get it to work, and you'll learn.
Write a program that catalogs all the MP3s on your computer ... Or connects to NOAA daily & gathers weather statistics ... Or serves a grocery list to the web browser. Think of something you have an interest in, and try writing code for that. Start with something simple, but start with something you know & interests you.
In preparing for battle I have always found that plans are useless, but planning is indispensable. -- Dwight D. Eisenhower