Guest User

Untitled

a guest
Nov 15th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. String productLine="1.00 REFRESCO COLA 1.20 1.20";
  2.  
  3. String amount="1.00";
  4. String product="REFRESCO COLA";
  5. String unitPrice="1.20";
  6. String total="1.20"
  7.  
  8. String lineProduct="1.000' CAÑA DE CERVEZA 0.0 1.20 1.20";
  9. String amount="1.00";
  10. String product="CAÑA DE CERVEZA 0.0";
  11. String unitPrice="1.20";
  12. String total="1.20"
  13.  
  14. String[] split = productLine.split(" ");
  15. String amount="split[0];
  16. String product = "";
  17. for(int i = 0: i < split.length-3; i++){
  18. if(i > 0 ){ //adding spaces
  19. product = product + " ";
  20. }
  21. product = product + split[i+1];
  22. }
  23. String unitPrice=split[split.length-2];
  24. String total=split[split.length-1]
Add Comment
Please, Sign In to add comment