I think there are plenty of good resources out there on internet for learning java some of them from which i have learned are 1. java by navin reddy* - youtube 2. JAVA: the complete reference by herbert schildt*. 3. JAVATPOINT 4. journal dev 5. w3resource java excercises(they are topic wise)
1. *KUDVENKAT* best to learn C# or .net framework from scratch 2. microsoft docs (little bit confusing) 3. C-sharp corner
For improving your problem solving capabilities do more and more programing on paper first then on IDE and Find problems by dry runnning them not by compiling.