Java 11 02: var type (MindTube)

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024
  • In this video I explained the new var type introduce in Java 11. How can we use it and rules to use var in java 11.
    - we can use var with local variables
    - It is easy to use/ quick and type safe.
    but we can not use var with class properties/ state, in method signature, Type of Functional interface and as a class name.
    Also var is a type not keyword.

Комментарии •