- 博客(2)
- 收藏
- 关注
原创 整型反转 如-123反转成-321
public class StringRevers { /** *int 类型反转 *test:1 1 *test:-1 -1 *test:123 321 *test:-123 -321 *test:-123456789 -987654321 *test:123456789 987654321 */ public static void main(String
2013-06-13 14:18:02
1790
原创 挑战题:字符串转换成整数 “456”转换456
今天看了别人的文章才发现自己没有考虑溢出问题,很遗憾地错过了这到题,但自己复习了好多以前的知识。 下面是自己的源码: public class getnumbers { public int getNumber(String str){ int len=0; int i=0; if(str==""){ return 0; } str=str.trim(); if(
2013-06-06 17:03:56
652
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人