Home > Back-end >  Write a simple code
Write a simple code

Time:09-20

As shown in figure thank you!

CodePudding user response:

Told you all the steps, give it a try

CodePudding user response:

Public static int the go (String STR) throws the Exception
{
Int length=STR. Length ();
If (length<8)
{
Throw new Exception ();
}
System. The out. Println (length);
Return length;
}

Public static void out () throws the Exception
{
Throw new Exception ();
}

Public static void main (String [] args)
{
String STR="1313131212";

Try
{
Int go=go (STR);
Out ();
} the catch (Exception e)
{
e.printStackTrace();
}

}
Didn't see the out method just wrote, the definition of,,
  • Related