InterviewSolution
Saved Bookmarks
| 1. |
Will The Following Class Compile? If Not, Why? public Class Singleton { Public Static T Getinstance() { If (instance == Null) Instance = New Singleton(); Return Instance; } Private Static T Instance = Null; } |
|
Answer» No. You cannot CREATE a STATIC FIELD of the TYPE PARAMETER T. No. You cannot create a static field of the type parameter T. |
|