Difference between #include and Import



Q) what is difference between # include and import ?

A) #include makes the C/C++ compiler to physically copy the entire header file code into the ‘Cor C++’ programs, Thus the program size will increase unnecessarily and hence it takes more memory and memory processor time.

Where as import statment makes the JVM to go to Java Library, execute the code there and substitute the result into the Java program “Here no code is copied”.

Random Posts

  • Life Cycle of stateless session bean
  • What is Thread, How to Use Threads?
  • Benefits of Connection Pooling
  • Define ServletOutputStream
  • Springs Interview Questions
  1. 1 Comment(s)

  2. By srikanth on Feb 18, 2009 | Reply

    dis is really good but make it little bit simple and easy00

Post a Comment