java.lang.NoSuchMethodError: Location: method <init>()V not found
at driver.main(driver.java:5)
this is my code for my first .java file:
Expand|Select|Wrap|Line Numbers
- public class driver
- {
- public static void main(String args[])
- {
- Location test = new Location();
- System.out.println(test.getX());
- }
- }
Expand|Select|Wrap|Line Numbers
- public class Location
- {
- private int x;
- public Location()
- {
- x = 0;
- }
- public int getX()
- {
- return x;
- }
- }
I am using BlueJ on WindowsXP.
The java files are in the same folder with all the other files that are created with BlueJ.