How Java is different than C/C++ in terms of memory allocation and de-allocation ?
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers

 Q1. How Java is different than C/C++ in terms of memory allocation and de-allocation ?Core Java
Ans. Java provides a faster allocation mechanism but at the cost of expensive deallocation. Deallocation in java is done by mechanism called garbage collection that runs periodically to free up unclaimed memory space , which actually slows down the application. Hence Java is usually faster if memory is not of concern and sufficiently large memory can be allocated to an application.

C/C++ on other hand have equal cost of allocation and de-allocation.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     c++  java vs c++     Asked in 2 Companies


Related Questions

  Difference between C++ and Java ?
 Java doesn't provide exclusive access to memory like C/C++ and other lower level languages ? What are the advantanges and disadvantages ?
  Which of the following is the implementation language for Map Reduce Framework ?
 What is memory leak ? How Java helps countering memory leaks compared to C++ ?
 Why Java is considered more purer object oriented language than C++ ?
 Why was Cassandra written in Java and not C++ ?
 In what terms Java is better language than c and c++ ?
 In what terms C or C++ is a better language than Java ?
 What is the difference between bubble sort using Java and C++ ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: