Answer the question
In order to leave comments, you need to log in
What is this way of initializing an object in Java called?
public class User implements Runnable {
...
}
User user = new User();
(new Thread(frontend)).start();
Answer the question
In order to leave comments, you need to log in
Способ инициализации никак не называется. Получается просто анонимный объект. У вас на него нет явной ссылки. Получить её можно будет только изнутри вашего Runnable с помощью Thread.currentThread().
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question