Why am i getting ” Duplicate modifier for the type Test” and how to fix it

Because you have

public
public 

there.

The obvious way to fix that: remove the first one. And next time: pay attention to what the compiler is trying to tell you.

Leave a Comment