[program-java] illegal start of type help required

  • From: "Roger Woolgrove" <rawoolgrove@xxxxxxxxxxxxxx>
  • To: "JavaProgramming" <program-java@xxxxxxxxxxxxx>
  • Date: Wed, 2 Mar 2011 17:23:31 -0000

Hi all,

This is probably a real easy one but here goes.
I am writing a constructor and get the subject as an error when compiling.

My constructor is as follows:
Public int[] cast = new int[valueFour];
// valueFour is a pre-determined value (int)
// array needs to be length of valueFour and not valueFour+1
for (int count = 0; count < cast.length(); count ++)

// if .length does not require () that is not issue as have tried both but 
can't remember whether required or not
{
this.cast[count] = valueTwo;
}

The error is with the for line, any ideas?

Many thanks

Roger

Other related posts: