#Illegal Start of Expression

9 messages · Page 1 of 1 (latest)

sterile drum
#

Sorry, but I am super new with Java. I am attempting to update information in a .jar that someone else made years ago. It's essentially a searching program. I tried to compile the .java file, but it threw a "illegal start of expression" error at me and I can't seem to find where the error is. This is the portion of code is getting me at (error under the first "p"). There obviously a lot more code above this since this is at the end of the string, but like I said I'm pretty new... so not sure if this is the real problem or not

  this.route.setText(this.prefRoute);
}

public static void main(String[] args) {
  RouteFinder rtf = new RouteFinder();
}
}```
crude dirgeBOT
#

This post has been reserved for your question.

Hey @sterile drum! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

sterile drum
#

this is the full code if anyone is interested

whole heath
#

I would think it is because of some syntax error. One easy way to fix it should be to load it in a IDE then it should highlight the problem.

sterile drum
whole heath
#

I would say check if you put a method inside a method

#

Also an IDE such as IntelliJ or replit if you’re online should work much better than jdoodle

sterile drum
#

thanks, that worked out great... appreciate it!