FIND THE ANSWERS

Can someone help answer coding bat java string 2 oneTwo please?

Answer this question

Do you know the correct answer? Make money answering questions! Join now.
  • Can someone help answer coding bat java string 2 oneTwo please?


Answers

Anonymous110244 | 07/01 2016 03:20
public String oneTwo(String str) { String temp = ""; String group= ""; if (str.length() < 3) return ""; for (int n = 0; n < str.length()-2; n += 3){ char first = str.charAt(n); temp = str.substring(n + 1,n + 3); group += temp + first; } return group}
Positive: 93 %
Anonymous6664469 | 07/01 2016 03:14
i hope this help you in someway :D public String oneTwo(String str) { String temp = ""; String group= ""; if (str.length() < 3) return ""; String m = str.substring(1,3); for (int n = 0; n < str.length()-2; n += 3){ char first = str.charAt(n); if(str.length() == 3){ temp = str.substring(1,3); group += temp + first; break; } temp = str.substring(n + 1,n + 3); group += temp + first; } return group; }
Positive: 87 %

Possible answer

... 417 VB.NET interview questions and 680 answers by expert ... Hi please i need some help here i want to ... Can someone help me with these ...
Read more
Positive: 93 %
With the advent of Java 2 ... there are microcontrollers that can run Java in hardware instead of a software Java virtual ... Please help improve it ...
Read more
Positive: 88 %
Noob Install guide Netbeans 8.0 ... please please please could someone walk me through this as a newer user i find the only ... See Question&Answer ...
Read more
Positive: 74 %
Software Development Forum; ... /CODING A PROGRAM FOR LOGIC GATES ... Can anyone please help me about binding 2 fields from the database and combine ...
Read more
Positive: 51 %

Show more results