public class Test { public static void main(String[] args) throws Exception { String resStr = Test.reverse(-123); System.out.println(Integer.parseInt(resStr)); }
public static String reverse(Integer value) throws Exception { String str = value.toString(); if (value >= 0) { StringBuffer sb = new StringBuffer(); sb.append(str); return sb.reverse().toString(); } else { StringBuffer sb = new StringBuffer(); sb.append(str.substring(1));
String sqlCount="select count(*) from usertable where username='"+ userName+"'";Õâ¾ä»° ʲôÒâ˼°¡£¡ Õâ¾ä»°Êä³ö³öÀ´¾ÍÊÇ select count(*) from usertable where username='ÄãµÄ±äÁ¿ ......