Your code looks ok to me, however it appears as though the JVM has
a problem with the array of type string ( I assume "args[]" is a array of
strings).
Try using an explicit cast of the array element to a string before the
"equals(x)" call
like this     " ((String)args[4]).equals( "yes" ) .
Good luck
Chris Hinds
:-)

Dimitrios Vyzovitis wrote:

> Hi.
> I am trying to test two strings for equality, but the virtual machine
> throws me an unexpected exception.
> The equality test is simply
>
> if ( args[4].equals( "yes" ) )
>      System.out.println( pyr.toString() );
>
> The result is
>
> Stack Trace : java.lang.NumberFormatException: yes
>         at java.lang.Integer.parseInt(Compiled Code)
>         at java.lang.Integer.valueOf(Compiled Code)
>         at test.Dump2p2_2.main(Compiled Code)
>
> Any ideas ?
> I am using jdk116v4a and compiled using jikes and javac.
>
> --
> Dimitrios Vyzovitis      -- Information Processing Laboratory
> [EMAIL PROTECTED] -- Aristotle University of Thessaloniki
> [EMAIL PROTECTED] -- Dept. of Electrical and Computer Engineering
>                             http://egnatia.ee.auth.gr/~dviz


Reply via email to