[4352] in java-interest

home help back first fref pref prev next nref lref last post

Re: My oh my not again

daemon@ATHENA.MIT.EDU (Ahmed Abd El-Hady)
Tue Dec 19 11:46:46 1995

Date: Mon, 19 Dec 1994 16:33:39 -0700
From: Ahmed Abd El-Hady <ahady@idsc.gov.eg>
To: Gary Alness <misman@hooked.net>
Cc: ahady@idsc.gov.eg, java-interest@java.sun.com

Hello,
I am not sure, but you can try using == instead of = in the if 
clause. 

Gary Alness wrote:
> 
> what is wrong with this code???
> 
> myrect.java:43: Incompatible type for if. Can't convert int to boolean.
>         if(args.length = 2) {
>         ^
> myrect.java:43: Invalid left hand side of assignment.
>         if(args.length = 2) {
>                ^
> myrect.java:44: Class Interger not found in void main(java.lang.String[]).
>                 int w = Interger.valueOf(args[0]).intValue();
>                                         ^
> myrect.java:45: Class Interger not found in void main(java.lang.String[]).
>                 int h = Interger.valueOf(args[1]).intValue();
>                                         ^
> 4 errors
> 
> I have tried the following in line 43
>                          if(args.length = 2) {
>                          if(args(length = 2)) {
>                          if(args("length = 2")) {
> 
> I know if I clear up line 43 then errors on 44 and 45 will go away
> 
> Thanks once again everyone....
> ---------------------------------------------------------->
> Gary Alness (misman@hooked.net) --------------------->
> Out here in San Jose CA                  --------------------->
> ---------------------------------------------------------->
> www.hooked.net/users/misman

Please tell me back if it works.

Ahmed
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post