09-12-2004, 04:44 AM | #1 (permalink) |
Upright
|
An Easier way to understand JAVA?
Hi im an I.T student in first year trying to learn java. i understand some concepts but dont understand most. i can explain some things to the teacher about concepts but when it coems to writting code and exams i just dont know how to write it. i always need a guide. what can i do to improve?ive tried to read a lot. i read over and over but i just dont understand 100%, mayb only about 50%. what can i do?
also ive written some C codes liek user defined functions so many times and understand whats there but when it coems to testes i just freak out and dont know how to write code. any help please? |
09-12-2004, 09:20 AM | #3 (permalink) |
Über-Rookie
Location: No longer, D.C
|
you are telling me that you already know C? Well, i am going to assume you know data structures and the like, so my best advice is to make an outline of whatever the program needs to do. Make it completely generic so it would fit any language. Then once you have that it should be a breeze to program.
Like bacon said, the only thing that might give you a bit of trouble at first is OOP, but after using it for a while, it really isn't all that bad. Just think of having an Object instead of a struct (except you can have functions within it) |
09-13-2004, 05:23 AM | #5 (permalink) | |
Crazy
|
Quote:
Objects have attributes. To change them, you need accessor functions (methods). Some attributes are public, so you can changed them directly by assigning some value to them as obj.length = 10. Some attributes are private, so you leave it up to the object to set them, by calling the appropriate accessor: obj.setLength(10). Same goes for fetching values of attributes. As another poster said earlier, the only way to learn to write code is to write code. Also, read other people's code, and try to understand why they wrote it the way they did, down to every single statement they wrote. You can learn a lot that way. Then build upon that knowledge, try to incroporate pieces of code you've seen in other programs into your own programs.
__________________
I want no escape. |
|
Tags |
easier, java, understand |
|
|