public class test{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String str = scan.nextLine();
System.out.println(str);
System.out.println(str.equals("abc"));........................true;
System.out.println(str=="abc"));........................false;
/*String str1[] = str.split(",");
System.out.println(str1[0]);*/
System.out.println("abc"=="abc");
}
}
求解答
|
|