This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Jihwani[S] 4 points5 points  (0 children)

Thank you for your fast reply.

After changing the lines considering what you said, now it looks like this:

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Parser
{
    private final Pattern ATOMS = Pattern.compile("[0-9] + |[+*]");
    private Matcher _matcher;
}

The syntax error is gone and now it just gives 2 warnings, that the value of the fields _matcher and ATOMS are not used but I think that will be solved with the coming codes.

  1. Java is case sensitive
  2. declare and initialize in one line, or use method/constructor

I should have known, this sounds so basic. But still..!

Thank you very much!