What part of memory - Stack or Heap - is cleaned in the garbage collection process?
Answer / nashiinformaticssolutions
On Heap memory, garbage collection is employed to release the memory used by objects with no references. Every object created in the Heap space has access to the entire application and may be referred to from anywhere.
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain different ways of passing arguments to sub-routine?
How many times garbage collector will invoke an object?s finalize() method?
Draw a UML class diagram for the code fragment given below: public class StringApplet extends Applet { private Label sampleString; private Button showTheString; private ButtonHandler bHandler; private FlowLayout layout; public StringApplet() { sampleString = new Label(" "); showTheString = new Button (" Show the String"); bHandler = new ButtonHandler(); layout = new FlowLayout(); showTheString.addActionListener(bHandler); setLayout(layout); add(sampleString); add(showTheString); } class ButtonHandler implements ActionListener { public void actionPerformed(ActionEvent e) { samplestring.setText("Good Morning"); } } } Note: The methods need not be indicated on the diagram.
what are class,constructor and primitive data types?
What are the steps involved to create a bean?
What is return in java?
How hashmap works in java?
What is the difference between stream and buffer?
Give me an example of array and linked list? Where they can be used?
What do you understand by overloading and overriding in java?
where to use join method and explain with real time senario?and programatical explenation also..
is JVM platform dependent or independent..?
11 Answers IBM, Tech Mahindra,