Re: Passing objects (not stones)
From: hiwa (HGA03630_at_nifty.ne.jp)
Date: 02/26/04
- Next message: Tum: "are directories files?"
- Previous message: Ola Gustafsson: "Re: Wildcards in <url-pattern>"
- In reply to: NotAsDumbAsILook: "Passing objects (not stones)"
- Next in thread: NotAsDumbAsILook: "Re: Passing objects (not stones)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 26 Feb 2004 01:25:46 -0800
toyota_trekker@yahoo.com (NotAsDumbAsILook) wrote in message news:<e3d370c6.0402251210.1e5215b3@posting.google.com>...
> I'm using NetBeans 3.5.1. Why doesn't this work?
>
>
> Referenced class:
>
> public class MyClass {
>
> ...
> ...
>
> // All sorts of methods in here that work
>
> ...
> ...
>
>
> public Object objectForValue(int i) {
> // test code
> Object o = "objectForValue";
> return o;
> }
> }
>
> Here's where the error is:
>
> public class MyOtherClass {
>
> ...
> ...
>
> // All sorts of methods in here that work
>
> ...
> ...
>
> public Object getObjectTest(int i) {
> // test code
> MyClass mine = new MyClass();
> Object o = mine.objectForValue(i); <<== ERROR
> return o;
> }
>
> }
>
> The error I get is:
>
> myTestModel.java [40:1] cannot resolve symbol
> symbol : method objectForValue (int)
> location: class MPNode
> Object o = mine.objectForValue(i);
>
>
> I intially just had the getObjectTest method as:
>
> public Object getObjectTest(int i) {
> MyClass mine = new MyClass();
> return mine.objectForValue(i);
> }
>
> but that didn't work either. It gave the same error.
>
> Apparently there is something about the Object class that I don't
> understand. Could someone enlighten me?
Wha, wha, wha, what is class MPNode? Isn't it the real problem?
- Next message: Tum: "are directories files?"
- Previous message: Ola Gustafsson: "Re: Wildcards in <url-pattern>"
- In reply to: NotAsDumbAsILook: "Passing objects (not stones)"
- Next in thread: NotAsDumbAsILook: "Re: Passing objects (not stones)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]