Main.java:12: error: class Solution is public, should be declared in a file named Solution.java
public class Solution {
^
Main.java:13: error: cannot find symbol
public boolean hasCycle(ListNode head) {
^
symbol: class ListNode
location: class Solution
Main.java:16: error: cannot find symbol
ListNode slow = head;
^
symbol: class ListNode
location: class Solution
Main.java:17: error: cannot find symbol
ListNode fast = head;
^
symbol: class ListNode
location: class Solution
4 errors