Who can translate this code from Pascal to Java, please help.
uses crt; var min,max,n,q,a:integer; begin write ('Vvedite kolichestvo chisel v posledovatelnosti: '); readln(n); write ('Vvedite posledovatelnost: '); read(max); min:=max; for q:=2 to n do begin read(a); if a>max then max:=a; if a<min then min:=a; end; writeln; write ('Raznica: ',max-min); end.