在函数中使用switch时用return返回值 为什么会提示没有返回值类型   能说下原理么? 我知道怎么改能出来结果  但是不知道这样写为什么回报编译错误   求解释 
如: 
        public static int tool(int a,int b,char ch){ 
            switch(ch){ 
                case '+': 
                    return a+b; 
                case '-': 
                    return a-b; 
                case '*': 
                    return a*b; 
                case '/': 
                    return a/b; 
                case '%': 
                    return a%b; 
            } 
        } 
 |   
        
 
    
    
    
    
 
 
 |