Comment: C++ "includes" behavior and java "imports"



Comment: C++ "includes" behavior and java "imports"..

Answer / mrangababu

#include in C/C++: #include makes a compiler to copy header
file code into a C/C++ program.
Dis Adv:It increase the program size unnecessarly.wastage
of memory and process time.

import in java : import statement makes JVM to go to the
java library execute the code there at finally substitute
the result into java program.JVM physically will not copy
any code.

import is efficient than #include....

Is This Answer Correct ?    16 Yes 4 No

Post New Answer

More OOAD Interview Questions

Explain Class Diagram in Detail.

2 Answers   InfoAxon Technologies, Protech,


What is virtual?

0 Answers   MindCracker,


Why should project managers complete hard problems first in an OOSAD project?

3 Answers  


What is Overloading ? Is it similar to overriding ?

0 Answers   MCN Solutions,


Explain about overriding polymorphism?

0 Answers  






Why is class hierarchies managed in object-oriented programming?

0 Answers  


What are the methods required to create changes in subclasses?

0 Answers  


What is the main difference between overloading and overriding?

0 Answers  


Is class an Object? Is object a class?

11 Answers  


Can we use static method definitions in interfaces?

0 Answers  


What is Polymorphism, overloading, overriding and virtual?

0 Answers   MindCracker,


Write a note on encapsulation?

0 Answers  


Categories