public class Main {
public static void main(String[] args){
String date = "01/01/2001";
String first = date.substring(2, 3);
String second = date.substring(5, 6);
System.out.println(first+second);
if (first=="/")
System.out.println("first ok");
if (second=="/")
System.out.print("second ok");
}
}
========================
以上未能print out 最後的"first ok"以及"second ok"
但System.out.println(first+second)中print out的確實是兩個"/"
請問問題出在哪?