I was reading this post:
How do I call one constructor from another in Java?
call one constructor from another in java
But I don't know what is the problem whit my code:
NOTE: Only I'm using one call of constructor of three... the error message is indicated like message using //
or /*...*/
...
class SomeClass {
private RandomAccessFile RAF = null;
public SomeClass(String theName) {
try {
RandomAccessFile raf = new RandomAccessFile(theName, "r");
this(raf); //call to this must be first statement in constructor
SomeClass(raf); /*cannot find symbol
symbol: method SomeClass(RandomAccessFile)
location: class SomeClass*/
this.SomeClass(raf); /*cannot find symbol
symbol: method SomeClass(RandomAccessFile)*/
} catch (IOException e) {}
}
public SomeClass(RandomAccessFile RAFSrc) {
RAF = RAFSrc;
//...
}
//...
}
What's the problem?