dcsimg
I want to call method f1() from class D(main method) WITHOUT CHANGING ANYTHING in class A
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Saurabh_Sanyal
Posted On:   Friday, September 4, 2009 07:19 AM

class A{ public void d1(){ System.out.println("I happy"); class B{ public void f1(){ System.out.println("She happy"); } } } class C{ public void g1(){ System.out.println("We happy"); } } } class D{ public static void main(String args[]) { A a = new A(); A.C v = a.new C(); v.g1(); a.d1(); } } I want to call method f1() from class D(main method) WITHOUT CH   More>>





class A{


public void d1(){

System.out.println("I happy");


class B{

public void f1(){

System.out.println("She happy");

}

}


}


class C{

public void g1(){

System.out.println("We happy");

}

}

}


class D{

public static void main(String args[])
{

A a = new A();

A.C v = a.new C();

v.g1();


a.d1();




}

}



I want to call method f1() from class D(main method) WITHOUT CHANGING ANYTHING in class A



   <<Less
About | Sitemap | Contact