A constructor is a method that is used to "construct" a new instance of an object. You put various initialization stuff in there such as values that some of your variables should be initialized with. When you are constructing an object you sometimes require that the object shouldn't be constructed with the default values for the instance variables but something other that, something of your choice. To give you an example assume the construction of a Daniweb member, when the member object is constructed it is already alloted with 10 reputation points and not the default 0. So you would implement this as:
class DaniwebMember{
private int reputation;
private int posts;
private string username;
// other stuff
//parameterized constructor
public DaniwebMember(){
reputation = 10;
posts = 0; // need not do this, since the default is 0 anyway.
// other init stuff
}
// other methods
}
Constructors can be parametrized or without any parameters. Those that accept parameters are known as parameterized constructors. There could also be multiple constructors for a single class indicating that the object could be initialized in multiple ways. This you can find out if you surf the Java APIs for some classes. If you do not provide a constructor for your class, Java will provide one for you which is known as the default constructor which will obviously not accept any parameters. But if you do provide a parameterized one it won't provide a default non-parameterized one for you. This is because it assumes the developer knows what he is doing and that may be the only way he wants his objects created.
Well thats about some concepts, coming back to your problem, you haven't defined the parameterized constructor that you are implicitly placing a call to. (through the use of the new keyword) on this line
Student s1 = new Student("kamal", "kandy", "5678");
on seeing this the compiler expects a constructor with three string parameters to be defined which it doesn't find and hence the error.