Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String[] tokens = "C 1.1 8.15.1 P 15.10.2012 83".split(" ");
- String c = tokens[0];
- String one_dot_one = tokens[1];
- String eight_dot_fifteen_dot_one = tokens[2];
- String[] tokensFor1_1 = one_dot_one.split(".");
- String[] tokensFor8_15_1 = eight_dot_fifteen_dot_one.split(".");
- myObject.setVarC = c;
- myObject.setVar2 = Integer.parseInt(tokensFor1_1[0]);
- myObject.setVar3 = Integer.parseInt(tokensFor1_1[1]);
- myObject.setVar4 = Integer.parseInt(tokensFor8_15_1[0]);
- myObject.setVar5 = Integer.parseInt(tokensFor8_15_1[1]);
- myObject.setVar6 = Integer.parseInt(tokensFor8_15_1[2]);
- if (tokens.length > 2) {
- // обрабатываем P 15.10.2012 83...
- }
Add Comment
Please, Sign In to add comment