Easy Tutorial
For Competitive Exams

void start()

{

A a = new A();

B b = new B();

a.s(b);

b = null; /* Line 5 */

a = null; /* Line 6 */

System.out.println("start completed"); /* Line 7 */

}

When is the B object, created in line 3, eligible for garbage collection?

after line 5
after line 6
after line 7
There is no way to be absolutely certain.
Explanation:

Option D is correct. I think there are too many unknowns about the method s and the classes A and B to be able to answer this question with any certainty.

Additional Questions

When 1100010 is divided by 0101, what will be the decimal remainder?

Answer

Databases overall structure is maintained in a file called

Answer

Which of the following is not the required condition for binary search algorithm?

Answer

include

main()

{

struct xx

{

int x=3;

char name[]="hello";

};

struct xx *s=malloc(sizeof(struct xx));

printf("%d",s->x);

printf("%s",s->name);

}

Answer

Which of the following command is used to display the directory attributes rather than its contents ?

Answer

The SQL WHERE clause:

Answer

Which of the following is not considered to be a basic element of an enterprise-class database system?

Answer

S1: A gentleman who lived alone always had two plates placed on the table at dinner time.

P : One day just as he sat down to dine, the cat rushed in to the room.

Q : One plate was for himself and other was for his cat.

R : She drooped a mouse into her own plate and another into her master plate.

S : He used to give the cat a piece of meat from his own plate.

S6: In this way the cat showed her gratitude to her master.

The Proper sequence should be:

Answer

S1: Satyajit Ray made several films for children.

P : Later film makers have followed his lead.

Q : Today other nations are making the childrens film in a big way.

R : This was at a time when no director considered children as potential audience.

S : Ray was, thus, a pioneer in the field.

S6: But today few think of Ray as a maker of childrens films.

The Proper sequence should be:

Answer

In the following questions choose the word which is the exact OPPOSITE of the given words.

VANITY

Answer
Share with Friends
Privacy Copyright Contact Us