从键盘中输入任意个数以倒序输出
import java.util.*;
public class Add{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
System.out.println("请输入任意数字:");
String line=sc.next();
StringBuffer sb=new StringBuffer(line);
System.out.println("倒序显示:"+sb.reverse());
}
}
补充:软件开发 , Java ,