How to initalize a string array in a main Java method : I have written some code which creates and initializes a String ArrayList. Is it possible to declare the arguments directly in to the String [] args method itself, rather than creating an extra String arrayList? I have done some searching on youtube/ google etc but didn't find a clear answer. Thanks

public class sampleCode{
	public static void main(String[] args ) {
	
	String[]args2 = {"en", "es"};
				
		if( args2[0].equals("en")) {
			System.out.println("english option");
		}
		else if( args2[1].equals("es")) {
			System.out.println("spanish option");
		}
		else System.out.println("this is the default option");
	}
}