Скажите, что такое null в java? Пример:
// это только фрагмент
public main() {
JFrame f = new JFrame();
f.setLocationRelativeTo(null);
// и так далее
}
Stack Overflow на русском — это сайт вопросов и ответов для программистов. Присоединяйтесь! Регистрация займёт не больше минуты.
Присоединиться к сообществуnull
- читается налnull
может быть сконвертирован (кастирован) в любой тип/класс/объектnull
Первая ссылка в гугле по запросу "null в java".
There is also a special null type, the type of the expression null, which has no name. Because the null type has no name, it is impossible to declare a variable of the null type or to cast to the null type. The null reference is the only possible value of an expression of null type. The null reference can always be cast to any reference type. In practice, the programmer can ignore the null type and just pretend that null is merely a special literal that can be of any reference type.