The code you provided is a Java program that uses the java.time and java.text packages to get the names of the days of the week in the default locale of the system and print them to the console. Here is a breakdown of the code:
When you run this program, it will output the names of the days of the week in the default locale of the system. The actual names will depend on the default locale set in your system. For example, if your system is set to the English (United States) locale, the output will be "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday".
import java.time.*; import java.text.*; public class CurrentLocal_WeekName { public static void main(String []args) { DateFormatSymbols symbols = new DateFormatSymbols(); String[] day_name = symbols.getWeekdays(); for (String n : day_name) { System.out.println(n); } } }
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions