Search:

Type: Posts; User: Norm

Search: Search took 0.18 seconds.

  1. Replies
    11
    Views
    2,076

    Re: declaring field variables

    If you remove the private for field, it compiles???
  2. Replies
    11
    Views
    2,076

    Re: declaring field variables

    Whoops, I used the old version of MyClass with a static final class instance.
    The following is the way to reference static variables in a class:

    MyClass.myInstance
    myInstance is not a static...
  3. Replies
    11
    Views
    2,076

    Re: declaring field variables

    That code compiles with no errors.

    Where is the problem?
  4. Replies
    11
    Views
    2,076

    Re: declaring field variables

    Please post a small, complete program that I can compile and get these errors from.

    Two lines of code can't be compiled to get the errors.
  5. Replies
    11
    Views
    2,076

    Re: declaring field variables

    Please post the full text of the error message and the code that caused it.
  6. Replies
    11
    Views
    2,076

    Re: declaring field variables

    Put an extra pair of {}s around the assignment statement.
Results 1 to 6 of 6