If you want to access only static methods of class B you don't need to instantiate an object of B in class A.
Interfaces can't have static methods. Interface can be used to access the non-static methods of a class.
SCJP 5.0, SCWCD 5, preparing for SCDJWS
nimo frey
Ranch Hand
Joined: Jun 28, 2008
Posts: 580
posted
0
Interfaces can't have static methods. Interface can be used to access the non-static methods of a class.
So if I provide a interface, then I need to instantiate the interface, when wanting to access its declared methods?