nirjari patel wrote:Oh, so order is also important. I thought, if you change the order , it will not be a problem.
Order is not important, except for a few. As said, the return type must come immediately before the method name. The method-generic type*, if present, must come immediately before the return type. Before that, any modifiers (public/private/protected, synchronized, static, etc) can come in any order.
* If you don't know what it means, don't worry. If you're still interested look up how generics in Java work.