can a class have more than one main()

can a class have an inner class with a main() in it

for example:

class hello

{

public static void main(String args[])

{

static class say

{

public static void main(strng args[])

{

System.out.println("hhhhaaaaaaaaa");

}

}

}

}

is it corect ,if so why are we using static for inner class can anyone explain

[402 byte] By [kalluraoa] at [2007-10-3 5:22:35]
# 1
Only one main allowed...Start here for inner/nested classes... http://java.sun.com/docs/books/tutorial/java/javaOO/nested.htmlHope this helps...
c2gilla at 2007-7-14 23:29:38 > top of Java-index,Desktop,Deploying...