📜  Java 的泛型编程不适用于原始类型.对或错? - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:17.383000             🧑  作者: Mango

代码示例1
String myStr1 = "Hello";String myStr2 = "Hello";String myStr3 = "World";System.out.println(myStr1.equals(myStr2)); // Returns "true" because they are equalSystem.out.println(myStr1.equals(myStr3)); // Returns "false"