You can have both main() and init()functions in a class. You need <pre>
public class myClass{
public static void main(){
...
}
}
</pre>
for any application to begin; init() is optional and is called only if you call it.
If you build an
applet,
<pre>
public class myClass extends java.applet.Applet{
...
}
</pre>
you need to write and init() method to override the init() method provided by java.applet.Applet to initialize your class; main() is optional and is called only if you call it.
Marilyn