Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CheckImports {
- public static void main(String[] args) {
- String[] theClass = {
- "import java.x;",
- "import java.y;",
- "import java.z;",
- "import java.x;", };
- checkImports(theClass);
- }
- private static void checkImports(String[] theClass) {
- // import tester
- for (int i = 0; i < theClass.length; i++) {
- for (int j = 0; j < i; j++) {
- if (theClass[i].equals(theClass[j])) {
- System.out.printf("Strings are equal for i,j: [%d, %d]%n", i, j);
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment