Capgemini interview question

Simple java coding like pattern printing, finding second biggest number