If you want to be a programmer until dark, in the long run, Java is more promising, and in the short term, ABAP is richer;
If you don't plan to be a programmer, ABAP should be more promising: the development direction of ABAP, the consultant of modules such as SAP BW and Basis, the consultant, project manager and leader with certain industry knowledge (ABAP is rarely born); I have no say in the development direction of Java.