%为特殊字符,直接输出会报错,
System.out.println(String.format("where name like %%s","Zhang san"));
要加上%进行转义
System.out.println(String.format("where name like %%%s","Zhang san"));
%为特殊字符,直接输出会报错,
System.out.println(String.format("where name like %%s","Zhang san"));
要加上%进行转义
System.out.println(String.format("where name like %%%s","Zhang san"));