Can we define a package statement after the import statement in java?



Can we define a package statement after the import statement in java?..

Answer / Shiva Tyagi

No, in Java the package statement must be the first line of a source file, before any imports.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Can the interface be final?

1 Answers  


What is the difference between a factory and abstract factory pattern?

1 Answers  


What checkbox method allows you to tell if a checkbox is checked?

1 Answers  


What is super?

1 Answers  


why java not supproting multiple inheritance?

5 Answers  


Can list be final in java?

1 Answers  


Is java call by reference?

1 Answers  


What is the difference between a local variable and an instance variable?

1 Answers  


What is application system?

1 Answers  


Is 0 a prime number?

1 Answers  


Is delete, next, main, exit or null keyword in java?

1 Answers  


Explain about features of local inner class?

1 Answers  


Categories