What happen when we write static public void instead of public static void?

What happen when we write static public void instead of public static void?

Hi,

What happen when we write static public void instead of public static void?

Thanks

View Answers

April 9, 2013 at 2:42 PM

Hi,

The program will compile first then run properly. For more details visit the reference site: http://www.roseindia.net/java/gettingstartedwithjava/public-static-void-main.shtml


April 10, 2013 at 2:56 PM

Hi , There is no order to declare the modifiers. Hence there is no differnet to declare the method by public static void or static public void.









Related Tutorials/Questions & Answers:
What happen when we write static public void instead of public static void?
public static void main
Advertisements
Why we are writting public static void main(String args[])?
Static keyword in public static void main
JAVA what is different between static block and public static void main(String a[]) method
Understanding public static void main function
What is Public static void main
STATIC
I'm getting an illgal start of expression error in my code for the public static boolean portion at the bottom... any ideas?
Can we replace main() with static block or with other static methods?
static
When will you define a method as static?
What is the importance of static variable?
static
static
static
What is static factory pattern?
Static
static
What is Static Website
What are the restriction imposed on a static method or a static block of code?
What is the difference between a static and a non-static inner class?
What do you understand by private, protected and public?
static & instance - Java Beginners
class static - Java Beginners
What happens to the static fields of a class during serialization?
can we inherit static method in java?
static functions
Can we declare a static variable inside a method?
what is static synchronizes - Java Interview Questions
static keyword in java
What is the difference between static and dynamic SQL?
core java, static - Java Beginners
PHP Late Static Binding
about static import - Java Beginners
In Java, what's the difference between public, default, protected, and private?
Static Variable
Why is the main method declared static?
static methods
static in java
PHP Static Variable and Methods
Static method
static code problem - Java Interview Questions
non static variable cannot be referenced from static context
PHP Variables Static
Static
static method
static keyword
static keyword
static Java Keyword

Ads