Reason behind the declaration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ambikasd
    New Member
    • Sep 2007
    • 12

    Reason behind the declaration

    Hi,

    Can anyone please tell me, why in java we follow a format of declaring

    packages first and then imports?
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by ambikasd
    Hi,

    Can anyone please tell me, why in java we follow a format of declaring

    packages first and then imports?
    There's only one package declaration.
    If you don't know which package a class/interface is in then you don't know how to specify your imports.

    Comment

    • ambikasd
      New Member
      • Sep 2007
      • 12

      #3
      Originally posted by r035198x
      There's only one package declaration.
      If you don't know which package a class/interface is in then you don't know how to specify your imports.
      Hi,

      Thanks for the reply:)

      Comment

      Working...