Integer.getInteger(str)和Integere.paraseInt(str)的区别
来源:互联网 发布:怎么查网络延迟 编辑:程序博客网 时间:2024/06/03 13:01
今天在将字符串转为整数时用错误函数,使用了Integer.getInteger(str),结果导致错误。
字符串转整数的用法是Integer.paraseInt(str)和Integer.valueOf();
Integer.getInteger(str)是获取系统参数的,不是将字符串转成整数的。
Integer.getInteger(str)相当于System.getProperty(str);跟System.setProperty(str,12)相对应,这样,Integer.getInteger(str)才可以获取到str为12的值
0 0
- Integer.getInteger(str)和Integere.paraseInt(str)的区别
- java中Interger.parseInt(String str),Integer.valueOf(),Ingeger.getInteger()方法的区别
- char *str和char str[]的区别
- char str[] 和 char *str 的区别
- char str[] 和 char *str 的区别
- char str[] 和 char *str 的区别
- char str[] 和 char *str 的区别
- char str[] 和 char *str 的区别
- char str[] 和 char *str 的区别
- char str[] 和 char *str 的区别
- char str[]和char* str的区别
- char str[] 和 char *str 的区别
- char str[] 和 char *str的区别
- char *str 和 char str[]的区别
- char* str和char str[]的区别
- char str[] 和 char *str 的区别
- char str[] 和 char *str 的区别
- "".equals(str)和str.equals('"")的区别
- Java 多线程 并发编程
- jQuery事件处理
- 第十五节:集合框架一(讲师笔记)
- LeetCode [37. Sudoku Solver] 难度[hard]
- Android 接口回调例子
- Integer.getInteger(str)和Integere.paraseInt(str)的区别
- 【继承】----子父类中成员函数--内存简单图解
- ELK配置
- [数据结构]c语言实现顺序栈的入栈,出栈,清空,销毁等操作
- Tomcat 并发优化
- ArrayList容器排序 comparator接口与comparable接口的使用
- Python.xlrd&xlwt -- Excel读写
- Basic Calculator II
- Js动态添加div实现模块复制