• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

import statement

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how do i make my group of classes be imported to my program ? whats the procedure for that
 
Ranch Hand
Posts: 1272
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your classes are not in a named package, just put them in the same directory that has the class named in the javac command or a directory named in your classpath.

If packages are involved, the first identifier in the package name should be a subdirectory either in the same directory as the file named in your javac command or a directory in your classpath. If there are other identifiers in the package name, create subdirectories downward from the first subdirectory. Store your class or interface source file in the lowest of these subdirectories.

You can refer to members of packages either by putting the full package name in front of the class or interface name every time you use it or with an import statement. References within the same package can just use the simple name.

You can look up the format and placement of package and import statements.

[ February 14, 2005: Message edited by: Mike Gershman ]
[ February 14, 2005: Message edited by: Mike Gershman ]
 
Ranch Hand
Posts: 168
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Pasaris,
I don't know how I got the feeling that you're not using your real name.

yosi isoy
 
I don't even know how to spell CIA. But this tiny ad does:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic