answersLogoWhite

0

Objects, mainly.

User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about Engineering

Where the Memory is allocated for a variable in a program?

if a variable is of value type memory is allocated on stack memory.. if it is of reference type,memory is allocated on heap memory..


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 do you make an antivirus program using Java?

A running java program only has access to the memory allocated to it by the Java Runtime Environment. Java by design does not allow access to absolute memory locations which is required to scan for memory resident viruses. A Java-based anti-virus program can still read a virus-signature file and use it to scan for those patterns in files to identify possible infected files.


How the new keyword allocates memory?

The new keyword in programming languages like C++ and Java allocates memory on the heap for an object or data structure. When new is called, it requests a block of memory sufficient to hold the specified type, initializes that memory (if applicable), and returns a pointer or reference to the newly allocated memory. This memory remains allocated until it is explicitly deallocated using delete in C++ or is automatically reclaimed by the garbage collector in languages like Java. Proper memory management is crucial to avoid memory leaks and ensure efficient use of resources.


Can a Java application have memory leak?

Java has a fairly sophisticated garbage collection system, and in general you don't worry about memory leaks, as they only happen in a few very specific circumstances (notably, when adding listeners to Swing GUI objects and not removing them). If you need more sophistcated memory management, java provides the clases in the java.lang.ref package.

Related Questions

Where the Memory is allocated for a variable in a program?

if a variable is of value type memory is allocated on stack memory.. if it is of reference type,memory is allocated on heap memory..


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 do you make an antivirus program using Java?

A running java program only has access to the memory allocated to it by the Java Runtime Environment. Java by design does not allow access to absolute memory locations which is required to scan for memory resident viruses. A Java-based anti-virus program can still read a virus-signature file and use it to scan for those patterns in files to identify possible infected files.


How the new keyword allocates memory?

The new keyword in programming languages like C++ and Java allocates memory on the heap for an object or data structure. When new is called, it requests a block of memory sufficient to hold the specified type, initializes that memory (if applicable), and returns a pointer or reference to the newly allocated memory. This memory remains allocated until it is explicitly deallocated using delete in C++ or is automatically reclaimed by the garbage collector in languages like Java. Proper memory management is crucial to avoid memory leaks and ensure efficient use of resources.


What is a heap in Java and how does it function within the Java programming language?

In Java, a heap is a data structure used to store and manage objects dynamically allocated during program execution. It is a region of memory where objects are stored and accessed by the Java Virtual Machine (JVM). The heap is responsible for memory allocation and deallocation, allowing objects to be created and destroyed as needed. This helps manage memory efficiently and ensures that the program runs smoothly without running out of memory.


In what are various cells of memory allocated consecutively?

Contiguous memory address are allocated to an array or vector.


Can a Java application have memory leak?

Java has a fairly sophisticated garbage collection system, and in general you don't worry about memory leaks, as they only happen in a few very specific circumstances (notably, when adding listeners to Swing GUI objects and not removing them). If you need more sophistcated memory management, java provides the clases in the java.lang.ref package.


How system knows what range of memory it has allocated while using free?

use free() how does the system know what range of memory it has allocated use free() how does the system know what range of memory it has allocated


Memory is allocated in 4k segments called what?

Memory page.


Where the heap memory is allocated in c?

Main Memory (RAM).


What is the maximum size of memory available for dynamic memory allocation?

The maximum memory that can be dynamically allocated depends on the size of the heap memory. Dynamic blocks of memory can be allocated in system heap until it is not full.


Max memory allocated by malloc in c?

Memory is allocated by malloc from the heap.... so max mem = size of heap that is free...