I'm new to Java and I need to create a value object (maybe it's called a mapped object in Java), but my code doesn't seem to work, here is the value object:
package ....;
public class User {
private int id;
private int uid;
private String name;
public User()
{
}
}
and I assign a new value object as follows:
public boolean some_function()
{
User u = new User();
return true;
}
So, if I comment on "User u = new User ();" I will go to the breakpoint, but if I save it as above, it just stops working.
On the other hand, I save both files in the same folder, so eclipse does not import the file, is this correct or should I import it?
EDIT:
After a while I found out that I had to import the file manually, I thought I tried it, but apparently did not.
source
share