Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我一直在寻找一种方法将字符串形式的句子转换为单独的参数,以便我可以这样做:
if(stringhere(args[1]).equalsIgnoreCase("argumenthere")) { dosomething(); }
使用String.split()方法:
String.split()
String[] arguments= sentence.split(" ");
一个问题,arguments变量从哪里来?
arguments