fork download
  1. class Program {
  2. public static void main(String[] args) {
  3. String text = "1 - -- * d 2";
  4. String[] tokens = "1 - -- * d 2".split("--");
  5. for (String token : tokens) {
  6. System.out.println(token);
  7. }
  8. }
  9. }
  10.  
  11. //https://pt.stackoverflow.com/q/394373/101
Success #stdin #stdout 0.05s 2184192KB
stdin
Standard input is empty
stdout
1 - 
 * d 2