Why can't I say : zz2 = z; after the line double zz2 = z; ??
thanks
Below the code.
Steve Bret
Greenhorn
Joined: May 03, 2006
Posts: 6
posted
0
For info I get this error message: C:\Java\test>javac -classpath C:\jdk1.5\bin TopLevelA.java TopLevelA.java:14: <identifier> expected zz2 = z; ^ 1 error
Keith Lynn
Ranch Hand
Joined: Feb 07, 2005
Posts: 2341
posted
0
Notice that where you have the statement zz2=z, you are in the inner class. You can't simply make an assignment statement where you declare variables. You need to put it in a block.
Barry Gaunt
Ranch Hand
Joined: Aug 03, 2002
Posts: 7729
posted
0
You are putting an assignment statement where only definitions are allowed.