How to execute a piece of code with out main method?
BY using static blocks we can do that,while loading calls into JVM it will be executed.
static{
System.ot.print("Hello satic");
}
from another class load this class with ForName.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment