I am facing some serious difficulties with an exercise where I am to write a simple program which would give a weekday name (not an int value) as an output. What`s more, it should be a weekday 90 days in the future from current date and it should be displayed in a local language (Danish).
I am a beginner and am seeking hints on how I should do this.
The important part of the exercise is that I cannot use more classes, than those imported (see below code).
What I found by myself is how to get the current date and present it as a weekday (I know it starts counting from 1 since Sunday), but I have no clue how to force it to show this integer as a weekday name in local language.
package days01;
import java.text.SimpleDateFormat;
import java.util.Scanner;
import java.util.Locale;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Calendar;
public class Dates {
public static void main(String[] argv) {
Calendar one = new GregorianCalendar();
int day = one.get(Calendar.DAY_OF_WEEK);
System.out.println(day);
}
}
The expected output should be a single weekday name 90 in future from current date.