Results 1 to 3 of 3

Thread: sample

  1. #1
    Junior Member
    Join Date
    Mar 2008
    Answers
    1

    sample

    What is the difference between #include statement in C/C++ and import statement in java?


  2. #2
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    Re: sample

    * import: expresses that the "importing" schema is going to use
    definitions and declarations from some other designated target namespace.
    The processor can use its own conventions for finding the schema for the
    imported NS (e.g. an HTML editor might have a schema for HTML built in),
    but the import statement can provide a schema document location hint
    (schemaLocation attribute.)

    * include: strictly a packaging facility. Lets you write the definition
    of a given target namespace in more than one document. Include names the
    other document(s) to be used. Include MUST name a document to be
    included, and the included document MUST have the same targetNS (if any)
    as the includer.

    --------------------
    suresh


  3. #3
    Expert Member
    Join Date
    Mar 2012
    Answers
    208

    Re: sample

    The #import directive is an improved version of #include was added to Objective-C.
    #include directive in c or in c++ allows to copy the entire header file code into the programs,there by increasing the program size unnecessarily and the CPU process time increases and it also requires more memory.
    The import statement makes the JVM to go to Java Library, execute the code there and substitute the result into the Java program and hence it reduces the process time, memory and there is no copy of code.


  4.  Sponsored Ads
    Ad


     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact