There are multiple syntactic problems with your code:
- Two opening
{
after your main method header; getMal()
is the wrong case, it doesn’t match your methodgetmal()
inAjaxR
;- There is no closing brace for your
controller
class; - There is no closing brace for
AjaxR
either.
However, when those errors are fixed (I will leave that as an exercise for you to complete!), your code behaves as you expect – “Hello” is printed and stat
is definitely set to true.