abstract class and private member.

A

archana

Hi all,

Can anyone tell me use of private member in abstract class having only
one abstract method

like
abstract class aaa
{
public abstract void pqr();
private int i;
}

Here what will be use if variable 'i'. Can i access it from anywhere?

thanks in advance.
 
M

Marc Gravell

I can't think of a sensible use... as far as I can see it would only
be reachable by reflection...

Marc
 
D

Duggi

Hi

The only way to reach "i" in the give piece of code is by reflection.
Even that case it is of no use.

I am sure that this type of situation will never occure.

Thanks
-Srinivas.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top