Andrzej Borucki wrote:But my ask: is possible main() function not in top of code?
In other words: I have class A and A.main()
B extends A and has no main().
Class A can be in library, and user edit only B. It is possible?
Sure; although I'm not quite sure what you mean by "user edit only B". I don't usually want users editing ANY classes I write. Or did you mean
extending?
IMO,
main() should only be used for launching, and should rarely contain more than a couple of lines. I'm not a GUI expert though, so I'm not familiar with the style suggested in your book, or why you would use it; but I'm sure they wouldn't suggest it without a good reason.
If you want another alternative, you might want to look at the
MainIsAPain page.
Winston