BT Group interview question

public class Test{ public static void main(String[] args) { try{ wait(); }catch(InterupttedException e){ System.out.println(e); } } output of this code?

Interview Answer

Anonymous

Dec 15, 2017

Cannot make a static reference to the non-static method wait() from the type Object