标题: 关于Switch [打印本页] 作者: 王责彬 时间: 2014-8-29 23:57 标题: 关于Switch 目前(JDK1.7)switch可以使用的类型为char、short、int、enum、String。其中前三个是一开始就可以的,enum是JDK1.5加入的,String貌似是JDK1.6加入的。如果尝试用long,则提示Cannot switch on a value of type long. Only convertible int values, strings or enum constants are permitted。作者: 忆梦追风 时间: 2014-8-30 13:18
楼主什么意思?就靠这点发帖?你也太水了吧