0% found this document useful (0 votes)
12 views8 pages

Java Interviews 1677664317

Uploaded by

67mimi67
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views8 pages

Java Interviews 1677664317

Uploaded by

67mimi67
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

ASHAY NAYAK

EP. 7
ASHAY NAYAK
Java interview
ASHAY NAYAK
ASHAY NAYAK
ASHAY NAYAK
ASHAY NAYAK
ASHAY NAYAK
By Ashay Nayak
ASHAY NAYAK
Hi Priya! I am Ashay.

ASHAY NAYAK
I am going to take
your technical round.
Hey Ashay! Thanks
for giving me this

ASHAY NAYAK
oppportunity.

ASHAY NAYAK
ASHAY NAYAK
ASHAY NAYAK
ASHAY NAYAK
By Ashay Nayak
ASHAY NAYAK
ASHAY NAYAK
I am going to ask
few Java Questions.
okay.

ASHAY NAYAK
ASHAY NAYAK
ASHAY NAYAK
ASHAY NAYAK
ASHAY NAYAK
By Ashay Nayak
ASHAY NAYAK If any object is no longer in use
then we should remove that

ASHAY NAYAK
What is garbage object from heap memory. The
collection in Java? process of removing unused
objects from heap memory is

ASHAY NAYAK known as Garbage collection.

ASHAY NAYAK
ASHAY NAYAK
ASHAY NAYAK
ASHAY NAYAK
By Ashay Nayak
ASHAY NAYAK
Sometimes object contains non-
java resources like connection
details and we want that object to

ASHAY NAYAK
hmm...
release those resources before
Why do we use
getting deleted. Thus, garbage
finalize () method in

ASHAY NAYAK
Java?
collector calls finalize() method just
before deleting the object where all

ASHAY NAYAK
resources get released.

ASHAY NAYAK
ASHAY NAYAK
ASHAY NAYAK
By Ashay Nayak
ASHAY NAYAK
Knowledge for You
ASHAY NAYAK
finalize() method present in Object class doesn’t

ASHAY NAYAK
contain any implementation. So there is a need to
override the finalize() method to define the actions

ASHAY NAYAK
which we want to do before object deletion.

ASHAY NAYAK
Let’s say we have created a Test class. We will
override finalize() method inside it. Now when any
object of the Test class becomes eligible for

ASHAY NAYAK
garbage collection, this override method will be
called. If you don’t override then the default

ASHAY NAYAK
implementation of finalize() method present in the
Object class will be called and nothing will happen
as it doesn’t contain any implementation.

By Ashay Nayak
ASHAY NAYAK
Check out my article
on Java

ASHAY NAYAK
Link in comment...

ASHAY NAYAK
ASHAY NAYAK

By Ashay Nayak
ASHAY NAYAK
To Be Continued...

ASHAY NAYAK
ASHAY NAYAK
ASHAY NAYAK
ASHAY NAYAK
ASHAY NAYAK
ASHAY NAYAK
By Ashay Nayak

You might also like