nag~1417


{ City } hyderabad
< Country > india
* Profession * mca
User No # 23778
Total Questions Posted # 0
Total Answers Posted # 2

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 38
Users Marked my Answers as Wrong # 2
Questions / { nag~1417 }
Questions Answers Category Views Company eMail




Answers / { nag~1417 }

Question { HCL, 13184 }

what is disadvantage of thread?


Answer

Threads also have some disadvantages:

Threads are not reusable as they are dependent on a process
and cannot be separated from the process.

Threads are not isolated as they don't have their own
address space.

The error cause by the thread can kill the entire process
or program because that error affects the entire memory
space of all threads use in that process or program.

Due to the shared resources by the threads with in the
process can also affect the whole process or program when a
resource damage by the thread.

For concurrent read and write access to the memory thread
will required synchronizations. Data of the process can
easily damage by the thread through data race because all
the threads with in the process have write access to same
piece of dat

Is This Answer Correct ?    35 Yes 2 No

Question { 6788 }

what is main difference b/w abstract class and interface


Answer

A class implementing an interface must implement all of the
methods defined in the interface, while a class extending
an abstract class need not implement any of the methods
defined in the abstract class. Additionally, a class
extending an abstract class can implement an infinite
number of it's own methods.

Abstract class does not support Multiple Inheritance .
Interface supports Multiple Inheriatnce..

The differnce is that in interface all are public but in
abstract class u can have private and protected members

Abstract class contains the method defination of the some
methods. but Interface contains only method declaration, no
defination

Is This Answer Correct ?    3 Yes 0 No