OverRiding Help
Posted
by
user445714
on Stack Overflow
See other posts from Stack Overflow
or by user445714
Published on 2010-12-28T18:50:17Z
Indexed on
2010/12/28
18:53 UTC
Read the original article
Hit count: 118
java
Few questions on over riding.
I am interiting a method openRead from another class, the method is to be overridden so that the scanner class uses the provided delimiter pattern, which is referenced. I need to make use of the scanner class useDelmiter method
method from another class
[code] public boolean openRead() throws FileNotFoundException { sc = new Scanner(new File(fileName));
if (fileName != null)
{
return true;
}
else
{
return false;
}
} [/code]
delimiter
[code] protected final String DELIMITERS = "[\s[^'a-zA-Z]]"; [/code]
I'm at a loss to how i over ride this using the constant delimiter.
© Stack Overflow or respective owner