Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Dispersia {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- }
- public int Plus(int a, int b){
- return a+b;
- }
- public String printTextPerRole(String[] roles, String[] textLines) {
- StringBuilder res = null;
- for(int i =0; i <roles.length; i++){
- roles[i] = roles[i] + ":";
- }
- for(int j =0; j < roles.length; j++){
- for(int i = 0; i < textLines.length; i++){
- if(textLines[i].startsWith(roles[j])){
- res.append(roles[i]);
- textLines[i].replaceFirst(roles[j],"");
- res.append(i);
- res.append(")");
- res.append(textLines[i]);
- }
- }
- }
- return res.toString();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement