Void
has become convention for a generic argument that you are not interested in. There is no reason why you should use any other non-instantiable type, such as System
.
It is also often used in for example Map
values (although Collections.newSetFromMap
uses Boolean
as maps don't have to accept null
values) and java.security.PrivilegedAction
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…