...

View Full Version : I need help



virtualpolecat
01-22-2012, 03:14 PM
Ok, so i wasn't sure if this was the right forum for JCreator or not, but i need help badly.

Jcreater gives me 2 compiler errors,

')' expected (line 59)

';' expected (line 59)


import static java.lang.System.*;
import java.util.*;

public class Java2207
{
public static void main(String[] args)
{
Problem07 parse = new Problem07();
parse.input();
parse.dataChopper();
parse.output();
}
}

class Problem07
{
String dataLine;
int count;


void input()
{
Scanner scan = new Scanner(in);

out.println("Enter letters separated by a colon: ");
dataLine = scan.nextLine();
}

void dataChopper()
{
Scanner chopper = new Scanner(dataLine);

chopper.useDelimiter(":");

while(chopper.hasNext())
{

String word = chopper.next();

if(dataline.equalsIgnoreCase("a") || dataline.equalsIgnoreCase("e") || dataline.equalsIgnoreCase("i") || dataline.equalsIgnoreCase("o") dataline.equalsIgnoreCase("u"))

count++;
}




}

void output()
{
out.println();
out.println("You entered " + count + " vowels.");
out.println();
}

}

Apothem
01-22-2012, 03:21 PM
Did you look at the line? I believe it's something related to:

.... || dataline.equalsIgnoreCase("o") dataline.equalsIgnoreCase("u"))

virtualpolecat
01-22-2012, 03:28 PM
Yes, that is line 59, but i have no clue whats wrong with it. (im a nub at this stuff)

Apothem
01-22-2012, 04:02 PM
You need one more or (||) in between that.

virtualpolecat
01-22-2012, 04:49 PM
Thank you, But it arises more problems. time to fix those.

virtualpolecat
01-22-2012, 04:54 PM
THANKS SO MUCH! I fixed it, couldn't have done it without your help, thanks again.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum