write a program that determine the number of day in a given semester ?

how complicated do you want to make it?

Do you care about leap years?
I'd start with an array containing the number of days for each month
Input the starting and ending dates of the semester.
Count the days between the dates.

Start by googling something like

java days between dates.
You will find many code snippets doing just what you want.