String str = new Scanner(System.in).nextline;
System.out.println( statement.execute(("select * from test4 where (username=1 and usercode=")+str));
若用户输入 'aa') or 1=1 则 会构成完整语句:
select * from test4 where (username=1 and usercode=“aa”) or 1=1;
1=1为恒为true,因此整个where恒为true;