First of all, I asume that this Pair class is a static nested class, if it isn't even if the Generic declaration would be Ok, it will still not compile because a top level class cannot be static.
This is a wrong syntax on how to declare a generic class.
When you are creating generic classes you don't need to specify the type of the class it will be because that would not be generic and it looses the whoole purpose of it, so the compiler will not allow it.
Having said this, for your code to works fine and compile it would be something like the following:
import java.util.List;
public class Pair<T,S>{
private T t;
private S s;
//add revelevant code here
public static void main(String[] args){
//When instantiating the class you declare the generics types you want to use, in
//your case String,List<String>
Pair<String,List<String>> pair = new Pair<>();
//Since Java 7 we can use diamond operator <> in instantiation to infer the
//generic type otherwise it would be like this.
Pair<String,List<String>> otherPair = new Pair<String,List<String>>();
}
}
If you have any more doubts about generics in java, please visit https://docs.oracle.com/javase/specs/ and find the Java Specification Language for the desired Java version and check the generics section.
Have a good day!