Java array: illegal start of expression
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Friday, January 17, 2003 05:48 AM

I keep geting this error : illegal start of expression AcademicsViewValue={45,45,45,75,50,50,85,25,100,100,25,100,100,25 }; ^ Here is my code, I can't find anything wrong with it. Can anyone spot anything wrong with this? Please help Thanking you in advance AcademicsViewValue={ 45,45,45,75,50,50,85,25,100,100,25,100,100,25 }; int AcademicsViewValue[]; AcademicsViewValue=new int[14]; if(course.equalsIgnoreCase("CS")) { AcademicsViewValue={ 45,45,45,75,50,50,85,25,100,100,25,100,100,25 }; }    More>>
			
I keep geting this error : illegal start of expression

AcademicsViewValue={45,45,45,75,50,50,85,25,100,100,25,100,100,25 };
^
Here is my code, I can't find anything wrong with it.
Can anyone spot anything wrong with this?
Please help Thanking you in advance

AcademicsViewValue={ 45,45,45,75,50,50,85,25,100,100,25,100,100,25 };

int AcademicsViewValue[];



AcademicsViewValue=new int[14];

if(course.equalsIgnoreCase("CS"))
{
AcademicsViewValue={ 45,45,45,75,50,50,85,25,100,100,25,100,100,25 };
}

   <<Less

Re: Java array: illegal start of expression

Posted By:   neal_ravindran  
Posted On:   Friday, January 17, 2003 08:23 AM

If it is in the sequence you wrote you have not declared the array..and have initialized it without declaring..
Use the following instead


int AcademicsViewValue[]={45,45,45,75,50,50,85,25,100,100,25,100,100,25 };

About | Sitemap | Contact