I have User class with field like login, password etc.
In method i tryed to get acces to field:
preparedStmt.setString(1, User.getid());
but is the error
non static method cannot be referenced from a static context
I have User class with field like login, password etc.
In method i tryed to get acces to field:
preparedStmt.setString(1, User.getid());
but is the error
non static method cannot be referenced from a static context
getid() is not static and therefore can only be called on an instance of User, not on User itself.
User someUser = ...;
preparedStmt.setString(1, someUser.getid());