This week's book giveaway is in the Agile and Other Processes forum. We're giving away four copies of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java and have Dr. Raoul-Gabriel Urma & Richard Warburton on-line! See this thread for details.
I looked for a newbie section but didn't see one. I'm new to Java and pretty much any other type of programming or scripting language.
I recently completed a Python course, and now I'm working on a Java course (week 3 or 8).
I have found some good info within these walls, and hopefully, in the future, I can contribute as well.
It is my goal not to be one of the "one and done" type posters.
I am currently working on trying to get variables called from one class back into the main. I don't have a specific enough question to post it yet,
as I'm at the "How do I do that?" stage as I try to figure it out. I'm learning, but it's a slow and frustrating adventure.
I am in the same boat as you are. I was told to stick with it and write as much code as I can by Googling the topic of the lesson(assuming that you are following a Java book). I went up to 700 pages in 4 months (the book has 1300 pages) I did comprehend the lesson , I typed the code of the lesson , I added a method or a class to make sure I understood the lesson and pass to the next lesson. Actually from the feedbacks I got from this forum I should have been coding more examples in Google in regard to of the lesson to make sure I understand really well the topic before passing to the next topic. Right now I stopped to the OOP of Java and I am coding a LOT of examples from Google , changing the code and so on and this I do it for at least 3 to 4 hours. In other words don't go to fast....
I have a background of ActionScrip3 which was OOP but this coding was done like 10 years ago , so I kind of forgot about it . AS3 was cool with the Flash IDE because because you could actually make small animation , starting some audio and so on...
Jeanne Boyarsky wrote:I've moved this thread for you.
Thank you Jeanne!
I'm taking a structured online class as part of my degree. It's why I have taken first Python and now Java; they're both required classes.
It's been a struggle, but I'm managing to fumble my way through.
I'm still currently working on how to use a variable that was initialized from another class. My code works if I have all of my variables
within the "main" class. The assignment calls for multiple classes to be used, so that is my task, figure out how to make it work, so far I haven't
had a lot of luck. It is my hope that the course material will cover it in a bit more depth than I have been able to glean from YouTube.
I'll be back with a specific question or 50 once I am able to figure out exactly what I'm trying to ask.
Bill Platt wrote:I'm still currently working on how to use a variable that was initialized from another class. My code works if I have all of my variables
within the "main" class.
Whenever I see this, it's always a source of consternation for me because it sounds like it goes against basic object-oriented programming principles, namely, encapsulation and abstraction. Object-orientation is more about behaviors and creating units of software that you can treat like objects that can be commanded to do things. The details of how those behaviors are accomplished should be hidden from the external world (encapsulation and abstraction) and that includes any variables you need to remember an object's state or values that are used to enable some behavior.
Sometimes there's also confusion on the part of the student involved. If you post a clear description of the problem you're dealing with and what you have tried, there are plenty of people around here who can help you work through your doubts and confusion.
The best ideas are the crazy ones. If you have a crazy idea and it works, it's really valuable.—Kent Beck