This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes ServerSocket.java Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "ServerSocket.java Question" Watch "ServerSocket.java Question" New topic
Author

ServerSocket.java Question

Harry Preston
Greenhorn

Joined: Jun 01, 2013
Posts: 9
From JDK, ServerSocket.java



SocketImplFactory.java



Question
How can you create instance (factory) of interface (SocketImplFactory)?
"= null" wat mean?
Myyron Murray Latorilla
Ranch Hand

Joined: Dec 10, 2009
Posts: 65

You create an instance using a class that "implements" that interface.

"null" assignment is unnecessary as the Class's Object type reference variable always get default value of null. Also means the reference variable isn't pointing to any object initially.


OCPJP6
Harry Preston
Greenhorn

Joined: Jun 01, 2013
Posts: 9
Got it, thanks help
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: ServerSocket.java Question
 
It's not a secret anymore!