Java Error: The constructor is undefined

Add this to your class:

public WeightIn(){
}
  • Please understand that default no-argument constructor is provided only if no other constructor is written
  • If you write any constructor, then compiler does not provided default no-arg constructor. You have to specify one.

Leave a Comment