the first example is possible, but example 2 is not possible and results in "illegal start of expression" error message from the compiler. why is it not possible to define a method inside of the run() method?
example 1
public class TextUpdater implements Runnable {
public void inter(){
}
@Override
public void run() {
inter();
}
}
}
example 2, not possible
public class TextUpdater implements Runnable {
@Override
public void run() {
public void inter(){ // results in error
}
}
}