Scanner s = new Scanner(System.in);
String result = s.next();
上面代码可以获取键盘输入的值
1)由英文和数字组成的不定长度字符串数组(数组)不定长,例如:{“abcd","123db",123c"}
2)生产者:每隔100毫秒,生产者读入数据,放入与消费者公用的仓库;
3)消费者从仓库中取出字符串,进行倒置,如上面{"dcba","bd321","c321"},最后对所有数据排序。
输出:字符串倒置后的排序结果,例如上面则为{"bd321","c321","dcba"} |