2

Почему с версии JDK 8 , знак подчеркивания (_) не рекомендуется употреблять в качестве идентификатора?

0

1 ответ 1

5

Потому, что он зарезервирован для использования в будущем.

We are "reclaiming" the syntactic real estate of "_" from the space of identifiers for use in future language features. However, because there are existing programs that might use it, it is a warning for identifiers that occur in existing syntactic positions for 8, and an error for lambda formals (since there is no existing code with lambdas.)

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.