java编程:字符串this is a test 倒序输出 test is a this

问题描述:

java编程:字符串this is a test 倒序输出 test is a this
1个回答 分类:综合 2014-11-08

问题解答:

我来补答
倒序应该是test a is this 如果你确定是test is a this,那么下面的代码对你没有帮助
public class Main{
public static void main(String[] args){
String str = "this is a test";
String[] words = str.trim().split(" ");
for(int i = words.length-1;i>=0;i--){
System.out.print(words[i]+" ");
}
}
}
再问: 对对对~~是test a is this~我打错啦~~谢谢你的回答!
 
 
展开全文阅读
剩余:2000
上一页:希望高人解答