Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Replies
    10
    Views
    1,310

    Re: Some Beginner questions

    There is lots of source code on the forum in various threads.
  2. Replies
    10
    Views
    1,310

    Re: Some Beginner questions

    I guess I assumed that you were asking how to call a method.
    Now I see you are trying to define a method.

    See the tutorial for all the details:
    Defining Methods (The Java™ Tutorials > Learning...
  3. Replies
    10
    Views
    1,310

    Re: Some Beginner questions

    Calling a method and extending a class (subclassing) are two completely different things.
  4. Replies
    10
    Views
    1,310

    Re: Some Beginner questions

    1) this refers to the current instance of the class
    2) Try it and see what is printed.

    That was a simple example not meant to have any realistic code.
  5. Replies
    10
    Views
    1,310

    Re: Some Beginner questions

    An example

    class SomeClass {
    int someVar = 33; // class variable

    void someMethod() {
    int someVar = 0; // a variable that shadows the class variable
    ...

    int x =...
Results 1 to 5 of 5