Interview questions on Java, J2EE, Spring, Struts, Hibernate
you can write "static public void" or "public static void"...it doesn't matter. if you remove "static" from the main method signature you will need an instance of that class in order to execute it....for example:if you want to just run a Java app in a batch environment MainClass.main(String) is called....which can happen because the main method is static and does not require an instance of an object. If main was not static you would have to execute that method like this:MainClass mainClass = new MainClass();mainClass.main(String);
Can you write one example sir?
I have read your blog its very attractive and impressive. I like it your blog. Java Training in Chennai Java Training in Chennai | Core Java Training in Chennai Online Java Training Java 8 Online Training | Java J2EE Online Training | JavaEE Training Institute in Chennai Java Training Institutes Java Training Institutes in Chennai Java Training in Chennai