0

I have a class Twitter which implements Interface Twitter.IHttpClient. Now contructor for Twitter uses same interface as paramter.

Twitter(java.lang.String name, Twitter.IHttpClient client);

How is that possible? As interface Twitter.IHttpClient will be member of Twitter class itself and I can't create a Twitter class without it through constructor? or

I am understanding wrongly?

Prannoy Mittal
  • 1,525
  • 5
  • 21
  • 32

1 Answers1

2

Twitter.IHttpClient is a static nested interface of the Twitter class.

As such, it is scoped statically and won't require an instance of Twitter.

Mena
  • 47,782
  • 11
  • 87
  • 106