java中try catch语句执行顺序简介

package com.string_lc;
/**
* @filename Test.java
* @author l
* @description 
*/
public class Test {  
    public static void main(String[] args) {  
    	String s = "asd123";
    	Integer userid = -1;
    	try {
			userid = Integer.parseInt(s);
		} catch (Exception e) {
			// ToId不为整型,说明不是给人员推送,可能是给设备推送
			System.out.println("e");
		}
		System.out.println(userid);
    }  
}  


猜你喜欢

转载自blog.csdn.net/hellorichen/article/details/80524285