abstract class and private member.

  • Thread starter Thread starter archana
  • Start date Start date
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.
 
I can't think of a sensible use... as far as I can see it would only
be reachable by reflection...

Marc
 
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

Back
Top