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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

what is full form OOP?

740


Explain about polymorphism?

693


What is the best tool for modeling and ORM framework

739


What does the “abstract” keyword mean in front of a method? A class?

734


What is the purpose of late binding in object-oriented programming?

743


What is a ternary operator?

713


Can a function be overloaded based on return types?

686


What is an abstraction and why is it important?

739


Explain the different types of constructors

696


Explain about inheritance?

785


What is the difference between an interface and abstract class?

778


What is single and multiple inheritance?

748


What is @functionalinterface?

752


What is method overriding?

709


What is the diffrence between an abstract class and interface?

800