Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Errors on main class an missing packages #132

Open
RobertFloor opened this issue Jun 22, 2020 · 0 comments
Open

Errors on main class an missing packages #132

RobertFloor opened this issue Jun 22, 2020 · 0 comments

Comments

@RobertFloor
Copy link

RobertFloor commented Jun 22, 2020

My java file used to be fine, but suddenly when I open it again I got the following errors.

  • The declared package "" does not match the expected package "src"
  • Error Java Implicit super constructor Object() is undefined for default constructor. Must define an explicit constructor

However this should not be necessary with this simple code

Example code

class Card {
    int value;
    String suit;
    String name;

    public String toString() {
        return name + " of " + suit;
    }
}

public class PickACard {
    public static void main(String[] args) {
        System.out.println("test");
    }
}

Additional info :
javac -version
javac 14.0.1
These errors go away if I move the files to a new directory

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant