This content has been marked as final. Show 2 replies
Yes, but you don't need the == true part.
This is one of the most amazingly trivial questions I have ever seen.
The only case where you should be writing scriptlets in Java is if you're writing a trivial toy application. Otherwise, scriptlets have been obsolete since about 2004 and you should use their replacement, which is JSTL plus EL. However that does require some design, but that's okay since you would be doing some design for any non-trivial application. In this case the design would involve using classes which follow the Java Bean specification; that method doesn't do that.
However given its clearly made-up name to hide its real function, I'm not going to suggest how you should repair that.