Hello there, Im having trouble with some Java, How do I give in default parameter values in java?.
for example I have this in c++
DVD(int i, string t, int y, string d="Unknown"): Items(i,t,y),director(d){}
and in Java I tried
public Dvd(int i, String t,int y, String d="Unknown"){
super(i,t,y);
director = d;
}
which fails to build. So how do I go about giving in default values?
also In my main testing class I tried giving in 3 arguments insead of 4 but this fails also. How do I get around this problem?.