Need to clarify the meanings

Ummm hi i was looking through java tutorials and btw im a newbie.

ok i saw this line

public static void main(String[] args) {

I dont know what it means and what it does can someone explain it in simple terms for me?

And theres also some terms i dont know such as,

-Classes(What are they?)
-Library(What is this library that they are referring to)
-Arguments(they gave me some examples such as args)
-Modifers(they said something about public and static)

Can someone kindly explain to me this in simple terms? i need Help im stuck D:

Have you actually read anything? At all?

Cas :slight_smile:

The Java Tutorial

http://download.oracle.com/javase/tutorial/getStarted/application/index.html#COMMENTS

This page and im stuck D:

I don’t know how you expect us to help you if that page can’t explain it.

Cas :slight_smile:

ummm well i just dont know whats the meaning of class and libraries . just the terms i mention i mean…because they never tell me what is the meaning of it in java… well…

so i just need to know the meanings :-\

Read this: http://en.wikipedia.org/wiki/Object-oriented_programming

Cas :slight_smile:

Oh Cool! it helps alot THANKS!!! :slight_smile:

From my own experience: Dont start programming with gamedevelopment try to find samething easiers eg. simple but usefull tools like paint.

If you’re learning to drive, would you head out to the Formula-1 and learn to drive one of those cars first?

I’m not saying it can’t be done, but geez… there are better ways.

There’s absolutely no way you can start programming games in Java before you can grasp the fundamentals of programming in Java.

You should find some book like “Beginning Java programming” or “Java programming for beginners” and do simple command prompt programs, then start doing simple Java2D stuff, and then climb that ladder of technologies.

::slight_smile:

I built games when I started programming. In my first week of programming I followed a tutorial to build a simple FPS and after only another week I had a world map (with a building), could move & look around, some collisions and a gun floating in front of the camera. The results were simplistic and the language I used had a very simple 3D engine in-built which did most of the hard work (like I didn’t know how to perform simple collisions until after another month) but from a beginner point of view it’s awesome when your able to build something like that very quickly.

Plus there are also tonnes of “learn to program with game development” style books. I personally think they tend to be terrible books not because they are too difficult but because they are too simple.

If done right, game development is one of the best methods for teaching people to program. At least it’s more exciting then building example apps for doing dull stuff like converting centimetres to inches.

[quote=Roys000]ok i saw this line

public static void main(String[] args) {

I dont know what it means and what it does can someone explain it in simple terms for me?
[/quote]
When your Java program runs it needs to know where to start, an entry point for your program. To do this there is a common ‘signature’ that the entry point takes and that is the ‘private static void main(String[] args)’ method above. All of that is required for the entry point to work, if any of it is missing then Java will not think it’s the entry point of your program. A quick cooks tour of what all those keywords do are:

‘public’ means it can be accessed by any part of the program. Until you fully understand what public does, and what it’s alternatives (private, protected and package-private) do, you should just always start your methods with the ‘public’ keyword.

‘static’ is optional and means it’s class-wide, but I wouldn’t worry too much about this yet (you should learn more about classes first).

Next some functions return a value, so when you call them you get something back. If they don’t return a value they have the return type ‘void’.

‘main’ is the name of the function. The entry point must be called main, but when you define other functions you can give them other names.

The ‘(String[] args)’ is the parameter that is passed into the application when it’s started. The ‘String[]’ is the type of the parameter and ‘args’ is the name of the parameter variable. The ‘[]’ bit means it’s an array and ‘String’ means the array can only hold Strings. Finally a String is essentially a piece of text.

well haha, i think im really a noob.

well ok a few more questions, please bear with me D:

what is parameters,conventions and variables? i keep googling and i still cant understand…

And i came across this word ‘int’ when i was reading some tut on java,in google they put ‘int’ is an integer.An integer is a whole number.

but i dont see what the word ‘int’ does in java programming. any simple explanation on this?

one example: int cadence = 0;

As you have been told by others: this approach won’t get you anywhere. Buy a book. Don’t flip the page until you understand what is written.

I’d like to learn something, but I don’t know it yet. What should I do?

Have someone else tell you what to learn, of course.

Good thing I didn’t come across this thread first today.

Cas :slight_smile: