mistake getting day of week

I want to get the day of the week (Monday, Tuesday, ..) from this function that receives as parameters 3 int that are the year the month and day, I have tried both Calendar and GregorianCalendar and …