India Jobs- IT Fresher Job in Delhi, Bangalore, Mumbai, Chennai.
www.Lkshya.com
Ask Your Query

Q. What is the difference between #include and import statement?




Characters Left
7 + 5
Rahul Kumar
#include directive makes the compiler go to the C/C++ standard library and copy the code from the header files into the program. As a result, the program size increases, thus wasting memory and processor?s time. import statement makes the JVM go to the Java standard library, execute the code there , and substitute the result into the program. Here, no code is copied and hence no waste of memory or processor?s time.so import is an efficient mechanism than #include.
Top Answered Questions Good at tech answer these

Some other Good Questions

Q:1 What is a Constructor in Java?

Q:2 How are positive(+ve) and negative(-ve) numbers represented internally in Java?

Q:3 What do Trojans, Viruses, and Other Malware do to our systems?

Q:4 Can abstract class have constructor in java?

Q:5 Difference between checked vs unchecked exception in Java?

Q:6 When is checked exception in Java?

Q:7 What is difference between == and equals() while comparing strings? Which one is reliable?

Q:10 Can we call a class a data type?

Q:11 What is the difference between #include and import statement?

Q:12 What is JIT Compiler?

Q:13 What is a swap space in Linux?

Q:14 What is the basic difference between BASH and DOS?

Q:15 How do you refer to the parallel port where devices such as printers are connected?

Q:16 How do you switch from one desktop environment to another, such as switching from KDE to Gnome?

Q:17 How does case sensitivity affect the way you use commands?

Q:18 Is it possible to use shortcut for a long pathname?

Q:19 How do you terminate an ongoing process?

Q:20 Write a command that will display all .txt files, including its individual permission in Linux.

India Jobs-How to get fresher software jobs in India| Search Jobs