字符串比较方法
package study5ran2yl.study; import java.util.Scanner; public class demo12 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println("请输入内容:"); String x = scanner.nextLine(); //字符串的比较方法 if(x.equals("bihao")){ System.out.println(x); } System.out.println("End"); scanner.close(); } }