Just when you think you've seen it all, the code below pops up in a java .class I'm hoping to learn from.
I'm not entirely sure what is happening here. First clean();
is declared but looks like both a field and a method at the same time?
Then another method below it uses this clean();
despite there not being any code inside backets after its declaration?
I'm very confused. Could anyone shed some light on this syntax?
public abstract void clean();
/**
* Clean method called whenever the user interface is closed, in order to clean
* internal and user-defined structures properly.
*/
void cleanFromUI()
{
// clean user-specific items
try
{
clean();
}
catch (EzException eze)
{
// do not display anything as the interface is being closed
if (!eze.catchException) throw eze;
}
// clear all variables
ezVars.clear();
ezgui = null;
synchronized (nbInstances)
{
nbInstances.setValue(nbInstances.getValue() - 1);
}
}