1.2运行时错误,运行时错误是指应用程序在运行期间执行了非法操作或某些操作失败,如打开的文件未找到磁盘空间不足、网络连接断开、除法中除数为零等等;·例:数组下标越界是一种典型的运行时错误。int [] arrayX = new int [4];for(inti=0;i<5;i++)arrayx[i] = i;
1.2 运行时错误 • 运行时错误是指应用程序在运行期间执行了非 法操作或某些操作失败,如打开的文件未找到、 磁盘空间不足、网络连接断开、除法中除数为 零等等; • 例:数组下标越界是一种典型的运行时错误。 int [] arrayX = new int [4]; for(int i = 0; i<5;i++){ arrayX[i] = i; }
1.2运行时错误电899128359class Programstatievoid Main(string[J args)int[] arrayX = new int[4]:for(int i=0:i<5:i++)arax 116AIndexOutofRangeExceptionrasmhandledX1718Index was outside the bounds of the array.19Iroubleshooting tips:Make sure.that the.maximun index on a Tist is ess than.the list size.Make sure data column names are correct.Make sure the index is not a negative number.Get general help for this exceptiontch1Search for more Help Online..Tamekctions:View Detail..Copy exception detail to the clipboard
1.2 运行时错误