Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Never Thought About This!!!!!

 
Vikrama Sanjeeva
Ranch Hand
Posts: 760
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guyz, I never thought that sequence of return type & static matters for compiler!
Means,
static void aMethod() is different from void static aMethod()!!
Why it is so??
Bye.
Viki.
------------------
Count the flowers of ur garden,NOT the leafs which falls away!
 
Tony Sam
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course the return type is most close to method name or variables , others wont compile !
 
Jim Hall
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public static synchronized native void amethod();
synchronized public static native void amethod();
synchronized native static public void amethod();
native public synchronized static void amethod();
The method modifiers can be in any order, but the return type must immediately precede the method name.
 
Vikrama Sanjeeva
Ranch Hand
Posts: 760
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx Tony & Jim.Now i can realize that i am standing under SUN
Bye.
Viki.
------------------
Count the flowers of ur garden,NOT the leafs which falls away!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic