> Alright I don't know what is going wrong here. When I complie the
> class it works fine but when I try and compile a class that makes an
[quoted text clipped - 71 lines]
> }
> }

Signature
Knute Johnson
email s/nospam/knute/
BlackJackal wrote:
>> public class Student
>> {
[quoted text clipped - 4 lines]
>> public static void main(String[] args)
>> {
// main() does nothing, why is it here?
>> }
>> public void setid(int a)
>> {
>> id = a;
>> }
...
>> public void getid()
>> {
>> System.out.print(id);
>> }
...
>> }
> As an aside, methods names should reflect what they do. get??? should
> return something not be a print method. Your getID() should look like:
>
> public String getID() {
> return studentID;
> }
As another aside, by convention the property name part of get... and set...
methods begins with an upper-case letter, but otherwise duplicates the case of
the private variable, which should begin with a lower-case letter. In general
all identifiers use camel case - the first letter is lower case for variables
or methods, upper case for class names, each subsequent word part begins with
an upper-case letter, the other letters are lower case. So your methods would
be getId() and setId(). Longer names would look like
"thisIsALongerVariableName" or "ThisIsALongerClassName".
- Lew