Compile Error: line 6:102 no viable alternative at character '"'

1.7k views Asked by At

hey so i keep getting a Compile Error: line 6:102 no viable alternative at character '"' error and i do not understand why. If anyone could explain this it would be great. Code follows:

public class leaderboardController {

public void describeSObjectsSample() {
  try {
      DescribeSObjectResult[] describeSObjectResults = connection.describeSObjects(new String[] { "Game__c","Game_User_Detail__c"});

  }catch(ConnectionException ce) {
      ce.printStackTrace();  
  }
}

}

1

There are 1 answers

0
Philipp Claßen On

Seems like an encoding problem. Even if it looks like a normal quotation mark, it can be in fact a different symbol, and that is what confuses the compiler. Maybe you have copy-pasted the code?

Try to delete the symbol and make sure to replace it by a normal quotation mark. That should fix the problem. If not, double-check whether the file contains only ASCII characters.