简体   繁体   中英

eclipse is not recognizing regular signs such as “;” or “()”

I'm trying to write a simple contactManager program and eclipse is not recognizing the basic signs such as ; or (). there is a Syntax error saying I should write exactly the same signs as I already used, or different irrelevant signs.

I tried deleting the project, the classes and start over, but the problem keeps showing.

public class ContactManager {

    Contact [] myFriends;
    int friendsCount;
}

Syntax error on token ";", = expected.

Sometimes word processors or publishing tools replace ASCII characters with similar looking Unicode characters. For example, I get the same error message with ; ( Unicode character ) instead of ; ( Unicode character \; ):

If you didn't type the code but copied it from somewhere, make sure that ASCII semicolons ; are used instead of other Unicode characters that look similar .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM