kugelblitz1162's blog

By kugelblitz1162, history, 2 years ago, In English

I recently started coding and being a newbie with no experience whatsoever I got stuck in this error "Source should satisfy regex [^{}]*public\s+(final)?\s*class\s+(\w+).*". If you are also facing the same issue, and have no idea what a regex is, here is a solution that worked for me. All you have to do is start with a public class where you have your main method, and then after the public class, all the other class in the file must be defined after it.

for example:

import **** // any imported package

public class .... { // write a main method here

}

class ..... //here you can define other classes used , just make sure it is after the public class { //define the class you wanna use }

P.S — sorry for my poor English, not a native speaker

  • Vote: I like it
  • -18
  • Vote: I do not like it

| Write comment?
»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I dont understand what to do,can u write the exmaple eof code, if u can?

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

thanks