2个回答
展开全部
import java.util.Scanner;
public class TestS {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("请输入一串字符a");
String a = input.next();
System.out.println("请再输入一串字符b");
String b = input.next();
System.out.println("a和b的连接字符为:"+ a + b);
}
}
public class TestS {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("请输入一串字符a");
String a = input.next();
System.out.println("请再输入一串字符b");
String b = input.next();
System.out.println("a和b的连接字符为:"+ a + b);
}
}
展开全部
import java.util.Scanner;
public class test {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String a = sc.nextLine();
String b = sc.nextLine();
System.out.println(a+b);
}
}
console:
abc
def
abcdef
public class test {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String a = sc.nextLine();
String b = sc.nextLine();
System.out.println(a+b);
}
}
console:
abc
def
abcdef
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询