Results 1 to 4 of 4

Thread: Import Question

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432

    Post Import Question

    I have a question !!

    im fairly new to Java and in my class we are doing multi class and we use

    Validation myVal = new Validation(intQuantity);

    to send the info to the class


    can i just import that class?? can call the function ???
    import Validation.*; ?????

  2. #2

  3. #3
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    imports arent really needed though. They just make things easier.
    You could refrence the Vector class without the use of imports if you wanted to as such.
    Code:
    java.util.Vector v = new java.util.Vector();

  4. #4
    Hyperactive Member marnitzg's Avatar
    Join Date
    Oct 2000
    Location
    South Africa
    Posts
    372

    Re: Import Question

    Originally posted by 308holes

    can i just import that class?? can call the function ???
    import Validation.*; ?????
    Importing like this won't work. What you're importing like this is everything that exists in the Validation package. What I think you're tying to do is somthing like the Math class
    ie i = Math.pow(1,1);
    You can do that with your class as long as the method you're calling is static.

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