CAN ANYONE EXPLAIN THE OUPUT AND THE ERROR OF/IN THE FOLLOWING PROGRAM

/*
Debug this program

*/

class WomenMen
{
unsigned int i;
String stirng s[];
String name[]={"men","women");
private f(int i)
{
system.out.println(String+" ");
}
void main(String arg[])
{
System.out.println("Press 0 to enter men's name /n press 1 to enter women's name");
Buffreredreader Br=Bufferedreader(new inputStreamReader(system.In);
i=br.readLine();
switch(i)
{
case 0:
string=br.readLine();
while(string.length());
string[i++]=br.readLine();
case 1:
string=br.readLine();
while(string.length());
string[++i]=br.readLine();
}
//
System.out.println("you have entered names of "+name[i=String.length()>=0]+"these are-:");
for(i-=(string[0].length()>0);string.length()>0;i++,f())
}

There are many problems:

1. Fix mispelling/case errors.
2. There is no unsigned keyword
3. main must be public static
4. f has no return type
5. readLine() returns String not int
6. I have no idea what you mean by the following line:

System.out.println("you have entered names of "+name[i=String.length()>=0]+"these are-:");

I recommend that you compile it and go error by error. Post the errors that you get here.

:mrgreen: For more help, www.NeedProgrammingHelp.com

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.