Hi, I am currently making an assigment for JAVA but I am stuck. I have to make a birthdate from the three parameters: day, month and year, which are numbers = int. With this I have to put in some checks for valid dates. That part I think is done, but I get stuck at the following:
I want let an if statement check the day, if the day is correct, this block of code should be run trough
if (dag >=1 && dag <=31)
{
datum = dag;
}
"datum" Is a String, because I want to get the date like this: DD-MM-YYY
And "dag" is an Int. So whenever I try to compile this, bluej gives an error at this part saying "incompatible types". I assume this is because I try to place a Int in a String. Is this possible in any way, because I can't find out how.