I am getting the following errors ----jGRASP exec: javac -g project1.java project1.java:21: error: cannot find symbol private List> funnies; ^ symbol: class Pair location: class Dircmp project1.java:71: error: cannot find symbol private List> commonBut() { ^ symbol: class Pair location: class Dircmp project1.java:282: error: cannot find symbol public List> getFunnies() { ^ symbol: class Pair location: class Dircmp project1.java:72: error: cannot find symbol List> files = new ArrayList<>(); ^ symbol: class Pair location: class Dircmp project1.java:77: error: cannot find symbol files.add(new Pair<>(file1.getAbsolutePath(), file2.getAbsolutePath())); ^ symbol: class Pair location: class Dircmp project1.java:89: error: cannot find symbol for (Pair filesPair : funnies) { ^ symbol: class Pair location: class Dircmp 6 errors ----jGRASP wedge2: exit code for process is 1. ----jGRASP: operation complete. What is going wrong? how do i fix them?
I am having issues compiling my code, it is too long to add manually, so i have added a link to it below
https://github.com/Philanthropenos/2023-final-work-for-os-class/blob/main/Relevent
I am getting the following errors
----jGRASP exec: javac -g project1.java
project1.java:21: error: cannot find symbol
private List<Pair<String, String>> funnies;
^
symbol: class Pair
location: class Dircmp
project1.java:71: error: cannot find symbol
private List<Pair<String, String>> commonBut() {
^
symbol: class Pair
location: class Dircmp
project1.java:282: error: cannot find symbol
public List<Pair<String, String>> getFunnies() {
^
symbol: class Pair
location: class Dircmp
project1.java:72: error: cannot find symbol
List<Pair<String, String>> files = new ArrayList<>();
^
symbol: class Pair
location: class Dircmp
project1.java:77: error: cannot find symbol
files.add(new Pair<>(file1.getAbsolutePath(), file2.getAbsolutePath()));
^
symbol: class Pair
location: class Dircmp
project1.java:89: error: cannot find symbol
for (Pair<String, String> filesPair : funnies) {
^
symbol: class Pair
location: class Dircmp
6 errors
----jGRASP wedge2: exit code for process is 1.
----jGRASP: operation complete.
What is going wrong? how do i fix them?
Trending now
This is a popular solution!
Step by step
Solved in 3 steps