import java.util.Scanner; /*createdBy zsm * 2021/11/1*/ public class ex2 { public static void main(String[] args) { String s1,s2=new String(); Scanner scanner=new Scanner(System.in); System.out.println("请输入一段话:"); s1=scanner.nextLine(); System.out.println("请输入一段话:"); s2=scanner.nextLine(); System.out.println(s1+s2); // 单行注释 快捷键ctrl+/ /* 快捷键 ctrl+shift+/ String s1,s2=new String(); Scanner scanner=new Scanner(System.in); System.out.println("请输入一段话:"); s1=scanner.nextLine(); System.out.println("请输入一段话:"); s2=scanner.nextLine(); System.out.println(s1+s2);
多行注释不能嵌套,禁止套娃! */ } }