The best way to do it:
package main_package;
import java.util.ArrayList;
public class Stackkkk {
public static void main(String[] args) {
ArrayList
Just create a function that can have as many elements as you want and call it to add them in one line.