[code=java]public interface IMain
{
public class Main
{
public static void main(String [] args)
{
System.out.prin tln("The main is defined inside an
Interface ");
}
}
}
[/code]
compile the program using javac.
run the program by typing java IMain$Main.
-----------------------------------------------------------------------------------------------------------
When you post your reply see the legend on the right of your edit window;
it explains how to use the code tags. Don't use the 'b' tag, use the 'code' tag
instead (see above for the result).
kind regards,
Jos
{
public class Main
{
public static void main(String [] args)
{
System.out.prin tln("The main is defined inside an
Interface ");
}
}
}
[/code]
compile the program using javac.
run the program by typing java IMain$Main.
-----------------------------------------------------------------------------------------------------------
When you post your reply see the legend on the right of your edit window;
it explains how to use the code tags. Don't use the 'b' tag, use the 'code' tag
instead (see above for the result).
kind regards,
Jos
Comment