Tips on my LIFO java code I've been trying to learn java recently and I finally finish my first code. Any suggestions on where I can improve? Also, is it possible to send an argument to a class using something like an init function in python and are there any good and bad habits that I should keep in mind?
class LIFO {
    
    //Create an empty list with the lenght of the given size
    //Initialize our top value as 0
    int my_list[] = new int[5];
    int top = 0;
    
    //Adds a value to the list
    //Add one to our top
    public void push(int data)
    {
        my_list[top] = data;
        top++;
    }
    
    //Removes the top value from the list
    //Substract one from our top
    public int pop()
    {
        int data;
        top--;
        data = my_list[top];
        my_list[top] = 0;
        return data;

    }

    //Prints our list
    public void show()
    {
        for(int n : my_list)
        {
            System.out.print(n + &quot; &quot;);
        }
    }
}

//Driver Class
class Main {
    public static void main(String args[])
    {
        LIFO s = new LIFO();
        s.push(1);
        s.push(2);
        s.push(3);
        s.show();
        System.out.println(&quot;\n&quot; + s.pop() + &quot; Popped from stack&quot;);
        s.show();
    

    }
}
@Ted Brownlow has answered your constructor question, but here's a few other points to consider going forward...
Consider your class interface
Your class needs to present an interface that is functional,usable and focused.  At the moment, your class is responsible for both implementing a LIFO and outputting them to the console.  These are really different concerns.  Consider if instead of writing to the console you wanted to write to a web page / different window.  Building the display logic straight into the class makes it less flexible.  A good exercise might be to remove the show method and decide what method(s) you would need to add to your class in order to allow it to be implemented from outside the class.
Bounds checking
At the moment your class has a fixed maximum size of 5.  However, other than by reading the class there's no way for the client to know (possibly missing a maxSize method or similar).  There's also no way for the client to know how many items are in the list, unless they keep track of it themselves (possibly missing a currentSize method or similar).
Without this size information, there's no way for the client to know if it's safe to call push or pop.  Consider what would happen if you already had 5 items when push was called.  What would happen if 0 items were present and pop was called?  At the moment, you're relying on the framework to handle these scenarios.  This can be ok, if it's a conscious decision, but you probably want to consider  adding some bounds checks and throwing exceptions that more explicitly help the user of your class know what they did wrong.