Hey everyone,
so this is my first serious try to learn Java programming.
I started a couple of days ago and everything went almost smooth!
Now im at the "Visibility of Variables" part ( Level 3, Lesson 3 ) and I feel like i miss a lot of info and understanding of basic concepts.
I don't understand clearly what is a class, a method, object and for sure i dont understand what visibility of variables mean.
I would love to have some reference to understand everything or someone who can explain me those topics and assist me to continue to next lessons and levels.
thanks upfront!
LeonThePro
Level 4
Feeling overwhelmed and lost
Under discussion
Comments (8)
- Popular
- New
- Old
You must be signed in to leave a comment
Thomas
30 October, 11:38
Learning a programming language is not really easy. It took me a few attempts to get past the basics. And that took time. And I'm not talking about days or weeks here.
Comprehension problems lurk around every corner. Trying out what you have learned yourself in your own programs and playing around with it can bring enlightening moments.
Codegym is great because it offers a lot of tasks. It could be better for learning theory. That's why I recommend in addition to codgym a beginner's book. Just a book on the other hand didn't get me any further, because I always thought I understood it. And then suddenly I didn't understand anything anymore. The practice is very critical. You need to code to learn to code.
A little later I recommend Bruce Eckel: Thinking in Java. But I wouldn't recommend it at the very beginning. You should already be at ~ level 15.
You can also come here for shorter questions. However, it's difficult to pack a wide range of topics into a short answer.
Sometimes it helps to just keep going. Many things will be explained or become clear over time.
Just keep in mind, you're not alone. All students here have moments when they no longer understand anything. It takes time to learn to think like a programmer.
+1
Thomas
30 October, 11:54
What is a class, a object etc.
That's a basic concept of object oriented programming languages and not easy to get it. Back then when oo became modern, a lot of programmers coming from functional languages didn't understand these concepts. As said, it needs time.
In short, a class is something like a blueprint and the object is the build result of this plan. The class defines how something may look, a house for example. That is has a size, a heigth, it may have different rooms etc. The object you fill with that data, you tell it to have 8 rooms and a size of 7x8 meters. If you want another house... you have the blueprint! Just tell Java how it should look like and it gives you and object of that house type. Now you can use it. So you do not work with classes, you work with objects. The class is defining how something should work and the data types it holds. The object is the class coming to life, filled with data. From a class you can construct endless objects and work with them. Eg you can write a Rectangle class. It defines that a rectangle has a upper left and a lower right corner. Now you can create rectangle objects. You can paint the rectangles, change the size, move them around etc. The build plan, the blueprint was the class.
But you'll get more info about that all the time. Aroung level 14, 15 you should have understood well what this is all about.
+3
Thomas
30 October, 11:57useful
A method is a structure to help you organize your code and make it reusable. A method is a part of a class (like the main method). If you'd try to write everything into that main method you soon would search through the code for ages if you try to modify something.
If you write a little method, then you can test this part and if it works, you forget about it. It just works. Then you do not have hundreds of lines in your main but just a call to a method. That's it.
+2
Thomas
30 October, 11:59
Visibility, I looked into my Level 3, Lesson 3 and there is nothing about visibility. All these topics you mentioned, except maybe methods, are a little bit to advanced for Level 3?
+2
LeonThePro
30 October, 13:19
here it is:
+1
LeonThePro
30 October, 13:20
Thanks a lot!!!!
It makes sense to me that from time to time I'll understand more and feel less helpless.
+1
Guadalupe Gagnon
30 October, 13:23
I concur with Thomas... learning how to program takes time and perseverance. Get a good programming book (I also use Thinking In Java) and also find some videos on Youtube. I made a forum post with links to some videos I found helpful (direct link here) which I can recommend you check out, specifically the beginner ones.
Don't get discouraged, almost every programmer goes through periods of feeling overwhelmed when they are new (and even when they have to learn new topics). I started learning programming back in the mid 2000's with just a book, got to a point that I was overwhelmed, quit, then started again a year or two later, got overwhelmed, quit, then started again a year or two later. This lasted for +/- 10 years before I found Codegym. Thomas mentioned the amount of tasks on here really helps you put theory into practice and I agree; that is what finally allowed me to learn 'how to program'.
+1
Thomas
30 October, 14:48
OK, looks like CodeGym changed few things here. I'm on the 'old' Java Syntax quest. So if you have questions it is best to attach the task/ your code to your post.
0