Answer Posted / jettimadhuchowdary
public class MainTest {
private int localPr =1;
public int localPb = 20;
protected int localPro = 3;
int localDf = 5;
/**
* @param args
*/
public static void main(String[] s) {
// TODO Auto-generated method stub
MainTest mainTest = new MainTest();
InnerClass class1 = mainTest.new InnerClass();
class1.call();
}
class InnerClass
{
void call() {
System.out.println(" display data localDf ="+ localDf);
System.out.println(" display data localPro ="+ localPro);
System.out.println(" display data localPb ="+ localPb);
System.out.println(" display data localPr ="+ localPr);
}
}
}
and the output is
display data localDf =5
display data localPro =3
display data localPb =20
display data localPr =1
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
which class is the wait() method defined in? : Java thread
What is data type in java?
What is a website container?
Are functions objects in java?
Can we use this () and super () in a method?
What is the purpose of finalization in java programming?
What is the access scope of protected access specifier?
Can we make a constructor final?
What is the difference between a local variable and an instance variable?
What is the difference between the final method and abstract method?
Can a function return a function?
Why string is not a wrapper class?
What is the common usage of serialization? What exceptions occur during serialization?
What is a war file?
What is the difference between reader/writer and inputstream/output stream?