473,418 Members | 2,063 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

regd "class,interface or enum expected error" in java

i donot find any errors,but for almost 18lines of the code am getting an error saying "class,interface or enum expected error".please look at the code below


package NQ;
import java.util.Random;
public class CGAQueen
{
CGAQueen(int chlen)
{

len=chlen;

}
int len;
int popusize;
int mrate;
public static int [][] chromosomeMatrix=new int[30][100];

void Initpopu();
public static void main(String args[])
{

CGAQueen c=CGAQueen(8);
c.Initpopu();
return 0;
}

};

void Initpopu()
{
Random random=new Random();

boolean bcheck;
for(int index=0;index<=popusize-1;index++)

for(int a=0;a<len;a++)
{

bcheck=true;
for(int b=0;b<a;b++)
int myInt=randGen.nextInt();
if(myInt%len==chromosomeMatrix[b][index])
bcheck=false;
if(bcheck)

chromosomeMatrix[a][index]=myInt%len;
else
a--;
}

}
May 7 '10 #1
0 1517

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Alan Wedin | last post by:
I have installed the Microsoft "User Interface Process Application Block". My application work fine as long as the user starts at the home page which doesn't inherit WebFormView. This page uses...
3
by: Robert | last post by:
---EN--- This message has been crossposted in a french speaking newsgroup, english version is at the end. Thanks a lot for your help... --/EN--- Bonjour, Je développe une application...
8
by: RC | last post by:
In my Access 2002 form, I have a combo box and on the AfterUpdate event I use DoCmd.RunSQL ("UPDATE .... to update records in a table. When it starts to run I get a message "You are about to...
0
by: Jas Shultz | last post by:
I'm using Win2K3 Enterprise edition with the latest .NET framework installed. I have this problem with getting "out of disk space" errors. It doesn't happen all the time but it does happen. When...
1
by: Punker | last post by:
Hi guys, I am trying to create export specifications for one of my queries. Now when I run the query on its own, it works perfectly. However when I try to export the data I get back the error...
2
by: Marty Meyers | last post by:
I have the following line in a php file: $msg= exec("perl $scriptPath/insert.pl $d $u $t 2>&1", $returnVal); Can someone explain the "2>&1" argument? Second problem, this same line of code...
0
by: dalaeth | last post by:
I have searched Google high and low and haven't found anything that works. Here's my problem, hopefully someone will be able to help! I'm using 1.1 Framework, and ODP.NET 9.5.0.7 on a Windows...
5
by: Alias | last post by:
Hi - I'm trying to implement a custom RoleProvider based on the SqlRoleProvider. I keep receiving a an error that it can't load type 'MyRoleTest.MyRoleProvider' when trying to load my...
4
by: HoganGroup | last post by:
I need to create an export file for the following brutal query to upload into a state database (go figure it's a government report!) All was good in my world until I tried to export. Manually or...
8
atksamy
by: atksamy | last post by:
HI, I am using the following query in vba and i get a compile error end of statement expected. sqltext = "SELECT .utyp, .uart, COUNT(.uart) AS CountOfuart," & _ ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.