JavaShuo
欄目
標籤
筆記:jdk 1.8 使用switch報錯:Incompatible types. Found: ‘java.lang.String‘, required: ‘byte, char, short o
時間 2021-01-04
標籤
web
欄目
Java
简体版
原文
原文鏈接
今天我在使用idea開發Java的時候發現,jdk1.8使用switch報錯,Incompatible types. Found: 'java.lang.String', required: 'byte, char, short o: 新版本一般也會向下兼容舊版本的特性,根據idea提示可能會變成1.7,關於這個的解決方法並不是沒有,上網查了很多資料,有位大神說是使用enum,參考鏈接https:
>>阅读原文<<
相關文章
1.
【Java】- Incompatible types. Found: java. lang. String', required:' byte, char, short or int'
2.
switch 語句編譯報錯Constant expression required
3.
IDEA使用switch傳入String編譯報錯解決
4.
jdk switch使用
5.
byte,short,char的隱含強制轉化爲byte,short,char的注意事項
6.
安裝多個jdk版本報錯:has value '1.8', but '1.6' is required. 筆記
7.
java.lang基礎數據類型boolean、char、byte、short、int、long、float、double (JDK1.8)
8.
Java學習筆記 - JDK學習Byte、Short、Integer、Long、Boolean等基本數據類型
9.
Java基礎-數據類型int,short,char,long,float,double,boolean,byte
10.
【JDK源碼】java.lang.String
更多相關文章...
•
TortoiseSVN 使用教程
-
SVN 教程
•
Docker 容器使用
-
Docker教程
•
Tomcat學習筆記(史上最全tomcat學習筆記)
•
Composer 安裝與使用
相關標籤/搜索
incompatible
short
required
char
types
java.lang.string
1.8
byte
switch
報錯記錄
HTML
Java
MySQL教程
MyBatis教程
Spring教程
JDK
應用
JDK 13
0
分享到微博
分享到微信
分享到QQ
每日一句
每一个你不满意的现在,都有一个你没有努力的曾经。
最新文章
1.
安裝cuda+cuDNN
2.
GitHub的使用說明
3.
phpDocumentor使用教程【安裝PHPDocumentor】
4.
yarn run build報錯Component is not found in path 「npm/taro-ui/dist/weapp/components/rate/index「
5.
精講Haproxy搭建Web集羣
6.
安全測試基礎之MySQL
7.
C/C++編程筆記:C語言中的複雜聲明分析,用實例帶你完全讀懂
8.
Python3教程(1)----搭建Python環境
9.
李宏毅機器學習課程筆記2:Classification、Logistic Regression、Brief Introduction of Deep Learning
10.
阿里雲ECS配置速記
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
1.
【Java】- Incompatible types. Found: java. lang. String', required:' byte, char, short or int'
2.
switch 語句編譯報錯Constant expression required
3.
IDEA使用switch傳入String編譯報錯解決
4.
jdk switch使用
5.
byte,short,char的隱含強制轉化爲byte,short,char的注意事項
6.
安裝多個jdk版本報錯:has value '1.8', but '1.6' is required. 筆記
7.
java.lang基礎數據類型boolean、char、byte、short、int、long、float、double (JDK1.8)
8.
Java學習筆記 - JDK學習Byte、Short、Integer、Long、Boolean等基本數據類型
9.
Java基礎-數據類型int,short,char,long,float,double,boolean,byte
10.
【JDK源碼】java.lang.String
>>更多相關文章<<