Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean isDuplicate(String soc, int plc) { // Result of false desired
- boolean b;
- for (int c = 1; c < plc; c++) {
- if (socialArray[c].equals(soc)) {
- b = true;
- if (b) {
- return true;
- }
- } else {
- b = false;
- }
- if (!b) {
- for (c = plc + 1; c < socialArray.length; c++) {
- if (socialArray[c].equals(soc)) {
- b = true;
- if (b) {
- return true;
- }
- } else {
- b = false;
- }
- }
- }
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement