如圖謝謝!
uj5u.com熱心網友回復:
步驟都告訴你了,自己嘗試一下uj5u.com熱心網友回復:
public static int go(String str) throws Exception{
int length = str.length();
if(length<8)
{
throw new Exception();
}
System.out.println(length);
return length;
}
public static void out() throws Exception
{
throw new Exception();
}
public static void main(String[] args)
{
String str="1313131212";
try
{
int go = go(str);
out();
} catch (Exception e)
{
e.printStackTrace();
}
}
沒太看明白out方法的定義就隨便寫了。。。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/55172.html
標籤:Java相關
