Jump to content
  • Advertisement
Sign in to follow this  
Old Speckled Monkey

Some really amateur questions

This topic is 4485 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys, I am new to Game Dev, and generally new to programming. I have started to learn some Java, however in the books that I am reading (Java in a Nutshell, and Learning Java), they assume that you know the bases of programming, so they explain the syntax, but without noob programmers in mind. So could it be possible for someone to explain a few things to me, just to get me off with programming. What are: 1. Classes 2. Variables 3. Methods 4. Fields 5. Members 6. Method Parameters 7. Arguments 8. Objects I understand that these are all to do with the structure of the programs and the syntax, I sort of understand these things, however I don't feel that I understand them enough to move onto learning the actual language. I hope that what I am saying is making sense, and that I am not making a complete fool out of myself. Thankyou OSM [Edited by - Old Speckled Monkey on July 6, 2006 4:15:15 PM]

Share this post


Link to post
Share on other sites
Advertisement
I would try to explain what I could, but I am short on time and that would take a while. In the meantime, just use google :).

Share this post


Link to post
Share on other sites
I don't understand what you mean by learning all that stuff before learning the actual language. The reason you learn a language is to learn those stuff. You can't learn how to spell before you've learned a language to spell with.

Since you seem to have a book that assume you have some knowledge, here are some random links:
Variables
OOP
Random Beginner Java Tutorial

Hope that helped..

Share this post


Link to post
Share on other sites
You might also get good help from wikipedia, for example, look here for variables : http://en.wikipedia.org/wiki/Variable#In_computer_programming

I'm just going to reorder the concept you said in order of complexity so you can learn more easily :
1. Variables
2. Functions
3. Arguments
4. Classes
5. Members variables (data members)
6. Member functions (methods)

Also, you must know that you will not be able to acquire all of these concepts easily, and you must always be sure to understand correctly what you know before trying to learn anything more.

Share this post


Link to post
Share on other sites
Thanks.
The thing is, I find that all these tutorials can be confusing.
For instance here is a snipet out of a tutorial, defining a class:
A class--the basic building block of an object-oriented language such as Java--is a template that describes the data and behavior associated with instances of that class. When you instantiate a class you create an object that looks and feels like other instances of the same class. The data associated with a class or object is stored in variables; the behavior associated with a class or object is implemented with methods. Methods are similar to the functions or procedures in procedural languages such as C.

This tries to define a class, but however it uses a whole load of other words connected to programming, that hasn't been explained, therefore I find the explanation difficult to understand, for instance it uses the word class, method and object.
I don't whether this is just me, trying to understand everything straight away, or wheter I should just crack on with learning the language.

OSM

Share this post


Link to post
Share on other sites
I think of it the same as trying to explain how to tie your shoe. You really just need to practice and play around with it.. Find something that works, and toy around with that.

Share this post


Link to post
Share on other sites
Classes are definetly not something you should try to learn right away without knowing the basics. Learn the basics first, variables, operators, create a hello world program for example and work up to the more advanced stuff like classes.

Since it says you only need to learn the bases of programming for those books, i'm sure knowing the basic and getting a little background is enough:
Language Basics

Share this post


Link to post
Share on other sites
A little example might help you :

Let's say you want to define a dog, what it is and what does it do. To describe these caracteristics, you use a class. Dog is a class. Now, if I have a dog which is called Raymund, then Raymund is a particular instance of a dog. Raymund is an object of class Dog. Raymund shares caracteristics of all dogs in the world, it has every caracteristic that the Dog class has. We know (at least I do) that dogs have a tail. Raymund is a dog so he has a tail. Tail is a (member) variable of class Dog. Also, Raymund, like all dogs, can bark. therefore, the dog class contains the method Bark. A method is an "action" that can make a class. Bark is a method (member function) of class Dog. Every instance of class Dog, like Raymund or his friend Fido, have the same member variables and member functions.

I hope that helped a little bit!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!