Can you please help me with below code. The error is: \"Cannot use This in a static context\"
public class Sample2 { /** * @param a
They keyword this refers to the instance of the class. In a static context, you have no instance, therefore you can't refer it.
this
For more information, refer to this answer: What is the meaning of "this" in Java?