It is difficult to say Java is better than .Net or vice versa. So, I have compared Java and .Net based on job postings on the employment sites and salaries submitted by employees.
In the comparison of Job postings, there is 1.16 percent of total job postings are there related to java and 1.03 percentage of total postings are there for .Net. In this category, both are almost equal and showing growth every year.
In the comparison of salaries, the average salary of a Junior java developer salary in India is 4.5 lakhs INR per annum. In the USA, the average salary is $ 56,000 per year. For Senior java developer, the average salary in the USA and India is $101,000 and 9.28 lakhs INR per annum. For Junior .Net developer, the average salary in the USA and India is $ 61,000 and 4.1 lakhs INR per annum. For Senior .Net developer, the average salary in the USA and India is $ 96,000 and 8 lakhs INR per annum.
I would suggest this Java course by Intellipaat if you want to learn Java.
You can watch this video on Java vs .Net for detailed comparison: