Results 1 to 4 of 4

Thread: Java header files

  1. #1

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Can anyone tell me how i could go about adding header files to my app if say i have two classes where one of them
    is a main. The sun microsystem online tutoral is great but none of the sample code compiles because they have to headers files included. What would be the proper syntax to
    use? import ourclassname



  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    292
    What do you mean exactly? You don't include header files into Java files like you do with C.
    "People who think they know everything are a great annoyance to those of us who do."

  3. #3
    Guest
    You import packages (with multiple classes) or import a single class. The current directory is also a "package", so if you do all your code in one directory, all classes are visible. You should group like classes into packages.

    import packagename.*;
    import singleClass.NameWithoutCLASSExtension;

  4. #4

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Thank you VirtuallyVB for helping clear up that matter
    for me. Im a vb programmer with a small amout of C++
    experience,and im trying to gravitate to Java ,so i wasnt to sure how Java treats the linking of classes.
    Last edited by Dilenger4; Dec 8th, 2003 at 12:28 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width