Java中没有别名。您可以
HashMap像这样用您的班级扩展班级:
public class TheNewType extends HashMap<String, String> { // default constructor public TheNewType() { super(); } // you need to implement the other constructors if you need}但是请记住,这将是一个类,与您键入的将是不同的
HashMap<String, String>



