Question
When is the Float object, created in line 3, eligible for garbage collection?
public Object m()
{
Object o = new Float(3.14F);
Object [] oa = new Object[l];
oa[0] = o; /* Line 5 */
o = null; /* Line 6 */
oa[0] = null; /* Line 7 */
return o; /* Line 8 */
}
a.
just after line 5
b.
just after line 6
c.
just after line 7
d.
just after line 8
Posted under Java Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. When is the Float object, created in line 3, eligible for garbage collection?
Similar Questions
Discover Related MCQs
Q. What allows the programmer to destroy an object x?
View solution
Q. Which statement is true?
View solution
Q. Which statement is true?
View solution
Q. Which statement is true?
View solution
Q. Which statement is true?
View solution
Q. A class which is declared with the ________ keyword is known as an abstract class in Java.
View solution
Q. Abstract class can have constructors and static methods?
View solution
Q. What is the syntax of abstract class in java?
View solution
Q. A method which is declared as abstract and does not have implementation is known as an _____________?
View solution
Q. An abstract class can have a data member, abstract method, method body (non-abstract method), constructor, and even main() method.
View solution
Q. Java is a ___ programming language.
View solution
Q. In Java programming language, the code is placed inside ___.
View solution
Q. Properties are implemented using ___ in Java.
View solution
Q. A Class in Java is like a ____.
View solution
Q. Which is the file extension used for a public Java class source code?
View solution
Q. Which is the file extension used for a compiled Java class file?
View solution
Q. State TRUEor FALSE.
The source-code of An Abstract-Class or Interface is kept inside a .java file.
View solution
Q. After compilation, an Interface or Abstract-Class is kept in a ___ file in Java programming.
View solution
Q. State TRUE or FALSE. In Java, a public class or abstract-class or interface must be kept in a separate .java file.
View solution
Q. In a .java file, how many numbers of public types namely class, interface or abstract can be managed?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Java Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!