This content has been marked as final. Show 2 replies
You can't put executable code like that just anywhere in a class. It has to be in a constructor or a method.
You can't just go and learn web development without learning the basics of the basics of the language first :s Judging by the mistake you're making here and your inability to figure out what you're doing wrong, you have a couple of months of studying and experimenting ahead of you before you should even think about touching anything web related.