Here is what I notice about the people who will discourage you. Decide to play video games for the rest of your life and it bothers no one. Decide to watch television every night forever and it bothers no one. Scroll for hours a day and not one person in your life will raise it with you.
Then announce that you are learning something for your future, and suddenly everyone is an economist. Isn't AI taking over coding? Isn't the job market terrible? The moment you try to do something good for yourself, the room finds its voice.
Look at who the opinions are coming from. I apologize for being bluntly honest, because I am not here to make you feel good, but most people are not happy with their lives and are not where they wanted to be. So if you want to make a mistake in life, listen to everybody. Care about everybody's opinion, and you think like everybody, you act like everybody, and you will be everybody. If you do not want to be everybody, be somebody different.
So one of the skills you have to develop is to ignore. Imagine we are climbing a mountain together, and the summit is the thing you want. A donkey steps in front of you and says it is icy, it is raining, it is muddy. You stop and explain to the donkey why the summit is worth it. Fifty minutes later there is a monkey, also certain the top is a bad idea, and you explain it again. Then a squirrel. If you just fixed on the summit and explained yourself to nobody, would you not get there faster?
Every discourager on that path gets a careful answer from you. What does the explaining actually cost?
The climb. Not the argument, which you will usually win, but the hours and the emotion that were supposed to go into the thing itself. So do not disagree with them. Somebody says AI is taking over coding, and you say yes, of course it is, you are right, absolutely. Somebody says the market is bad, and you say of course it is bad. Just agree with them. Let them get that satisfaction, let them shut the hell up, and move on. When you never disagree there is no argument, and every drop of effort stays where it belongs.
People always think this is about Java. It's not. It's not a job that makes you successful. It's a certain decision and choice you make in life, and you already have somebody in mind.