The following code:
- Import java. util. collections;
-
- Public class Test01 {
- Public static void main (String [] args ){
- System. out. print ("Enter the course code (number between 1 and 3 ):");
- Wrote input = new partition (System. in );
- Try {
- Int courseCode = input. nextInt ();
- } Catch (Exception ex ){
- System. out. println ("the input is not a number! ");
- Ex. printStackTrace ();
- }
- System. out. println ("Welcome to make suggestions ");
- }
- }
-
The following error message is incorrect:
650) this. width = 650; "style =" width: 695px; height: 797px "border =" 0 "alt =" "width =" 681 "height =" 795 "src =" http://www.bkjia.com/uploads/allimg/131228/11524U211-0.png "/>
Correctly display exception information such:
650) this. width = 650; "style =" width: 709px; height: 313px "border =" 0 "alt =" "width =" 668 "height =" 304 "src =" http://www.bkjia.com/uploads/allimg/131228/11524S014-1.png "/>
You can adjust it according to the following method:
650) this. width = 650; "style =" width: 714px; height: 746px "border =" 0 "alt =" "width =" 1048 "height =" 861 "src =" http://www.bkjia.com/uploads/allimg/131228/11524S557-2.png "/>
This article from the ", dipper core °" blog, please be sure to keep this source http://302838282.blog.51cto.com/4830900/1118433