会返回异常
Integer.Parse(string)
不会返回异常
Integer.tryParse('12',i);
结果:true 12
Integer.tryParse('12a',i);
结果:false 12
Integer.tryParse('a12',i);
结果:false 0
Integer.tryParse('1a2',i);
结果:false 1
会返回异常
Integer.Parse(string)
不会返回异常
Integer.tryParse('12',i);
结果:true 12
Integer.tryParse('12a',i);
结果:false 12
Integer.tryParse('a12',i);
结果:false 0
Integer.tryParse('1a2',i);
结果:false 1