Amazon interview question

2 JAVA basic questions; 2 coding problems; 2 behaviour questions