Your question doesn't make much sense.
When you call a constructor, you are passing it data from outside the instance being created with this constructor.
The method getSubj
looks like a setter (despite its name). It is another way to update the state of the object after the constructor is called, but it's not passing anything to the constructor, since it can't be called before the constructor is executed (unless the constructor calls it, in which case the constructor would be passing data to it and not the other way).
You code would make more sense this way:
private int sub;
public void setSubj (int sub) // renamed from getSubj, since it's a setter
{
this.sub = sub;
}
public schedule (int sub)
{
this.sub = sub;
}
public static void main (String[] args)
{
schedule s = new schedule (10); // invoke the constructor
s.setSubj(20); // invoke the setter method to change the state of the instance
}