answersLogoWhite

0

How you allocate the memory in java?

Updated: 8/17/2019
User Avatar

Wiki User

14y ago

Best Answer

In Java we need not allocate memory manually. The JVM would take care of allocating as much memory that your objects would require automatically.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How you allocate the memory in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you make your fps better on minecraft?

install optifine and play around with the settings. you can also allocate more memory to java. and you can turn the sound off. and you can update your java


How can you solve the javanetsocketexception on Minecraft?

allocate more memory to run minecraft. Use a 64-bit java for optimum peformance


What is an object in Java?

object is an instance of a class. it's used to allocate memory dynamically at run time to access class members.


How can you allocate memory dynamically in Java?

To give java more memory there are a series of steps to follow. To start, go to the computer's control panel, select programs, then go to java settings. This should initiate the Java control panel to pop up. Click on the Java tab followed by the view button. Click on the "runtime parameters" and input the specifics desired. Once finished hit okay then apply and it should increase the memory on your Java.


How is java reliable?

Java is robust because it is highly supported language, meaning that unlike C you cannot crash your computer with a bad program. Also, another factor in its robustness is its portability across many Operating systems, with is supported by the Java Virtual Machine.


What is memory leak problemin java?

Memory leaks do not occur in Java as the garbage collector clears the memory which has no references.


What are the different function used for dynamic memory allocation?

alloc :- to allocate memory. calloc :- to free the memory.


How the new operator works in java?

1. It is the only way to create object. 2. New is a keyword. 3. New operator allocates memory for an object. 4. It is a bit faster and clever way of creating objects or instances.


Why does java provide garbage collection?

The idea of garbage collection is to reclaim unused memory - getting rid of objects that are no longer used. Since in Java, the programmer doesn't have to explicitly de-allocate memory that has been allocated, that not only reduces programming effort, this also eliminates a cause of lots of errors - since an error in this respect, by the programmer, would most likely cause a so-called "memory leak".


What is Memory management in ms dos?

MS-DOS does not have built-in memory management.


What will happen if you allocate memory using new and free it using free or allocate sing calloc and free it using delete?

The C++ new uses malloc internally to allocate memory and the C++ delete uses free internally to revoke memory. However, they are not interchangeable and so memory allocated with new MUST be revoked with delete. If you mix them up, you will have a memory leak! Haya.


When memory allocate to Static data in c?

Compilation time.