Java self-study: the advantage is to save money. The disadvantage is that the study time is uncertain, the study cycle is easy to lengthen and the study is not systematic enough. For those who have no foundation or weak self-control, it is easy to give up halfway. There is no answer to the question you don't understand, it is difficult to learn, and it is easy to have a little knowledge.
Java training: The good place is to study the curriculum system, follow the teacher less detours, the learning cycle is shorter, and it is convenient to find a job. The disadvantage is that it costs money.
If you are learning Java because of a simple hobby, self-study is a good choice. But if you want to change careers by learning Java technology, you'd better take a Java training class. Of course, you may think it is expensive to attend Java training classes now, but it is still worthwhile for you to find a job through study.
If you decide to learn Java technology, don't hesitate. Time waits for no one to take action. Whether you are self-taught or attending Java training, you must have a practical understanding.