Publicis Sapient interview question

Java 8, programming ques, thread