View Single Post
Old Nov 14th, 2006, 2:42 AM   #7
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Before you learn how to program in a language, there is really a minimum of information you should know before asking questions. In Java, this is a class:
java Syntax (Toggle Plain Text)
  1. class DayOfWeek
  2. {
  3. }
This is the definition of a function, also known as a method:
java Syntax (Toggle Plain Text)
  1. String fooey(String s)
  2. {
  3. return s + "? Fooey!";
  4. }
This method takes in a string as input, and returns a string as output. In Java, all methods have to be defined inside a class. This is a variable:
java Syntax (Toggle Plain Text)
  1. String name = "Churchill";
Variables can be defined in a class, or in a method. This is a method call:
java Syntax (Toggle Plain Text)
  1. System.out.println("Hello World");
Generally speaking, a method call should be called from another method. The method with the name "main" will be called automatically when the program starts.

However, I'm not sure why I'm writing this, because there are far better places to learn the basics. Honestly, it's like asking why your car isn't working, and then asking simple questions like, "Tyre? What's a 'tyre'?". We can't help you if you don't know the absolute basics.

Also, it helps if you speak using as good English as you can manage. This shows you're taking the effort to be understood, which encourages other people to take some effort to help you. If you can't be bothered to string together a valid sentence, why should people be bothered helping you? Also, programming languages typically require the programmer to strictly adhere to the syntax of the language. It might help for you to start practising on English, first.

And if you're wondering why I'm saying this after I gave you some basic information; it's because I'm a helpful imbecile. However, even my patience has it's limits.
Arevos is offline   Reply With Quote