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(i nt i) {
// test code
MyClass mine = new MyClass();
Object o = mine.objectForV alue(i); <<== ERROR
return o;
}
}
The error I get is:
myTestModel.jav a [40:1] cannot resolve symbol
symbol : method objectForValue (int)
location: class MPNode
Object o = mine.objectForV alue(i);
I intially just had the getObjectTest method as:
public Object getObjectTest(i nt i) {
MyClass mine = new MyClass();
return mine.objectForV alue(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?
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(i nt i) {
// test code
MyClass mine = new MyClass();
Object o = mine.objectForV alue(i); <<== ERROR
return o;
}
}
The error I get is:
myTestModel.jav a [40:1] cannot resolve symbol
symbol : method objectForValue (int)
location: class MPNode
Object o = mine.objectForV alue(i);
I intially just had the getObjectTest method as:
public Object getObjectTest(i nt i) {
MyClass mine = new MyClass();
return mine.objectForV alue(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?
Comment