This doesn't compile and gives the following error: Illegal start of expression
. Why?
public static AppConfig getInstance() {
return mConfig != null ? mConfig : (throw new RuntimeException("error"));
}
See Question&Answers more detail:os