For anyone looking forward to learn one of the famous and widely used programming language ‘Java’, it’s really important to first focus on following five items.
(These are the basic items that you must start with, however, I assume you have some sort of basic knowledge about what Java its, how to install. If you don’t know, here you can find how to setup Java.)
- Object Oriented Programming
- Polymorphism, Abstraction, Inheritance and Encapsulations these are the pillars of object oriented programming
- Most of us don’t spend much efforts in learning and understanding this concepts
- It’s really important for any Java programmer to properly know these concepts not just theoretically but practically, too.
- Checkout existing code of Java or any other library and find out where and how these concepts are used
- Know what is object, class and interface, find out when and where these items are used
- Start relating these things with real time scenarios, like prepare structure (on paper atleast) of some banking system, ATM machine or something, not with actual implementation but just classes and interfaces with methods.
- Main Method
- Purpose of main method in Java
- Reason behind modifiers and arguments used in main method.
- Tryout printing something in console in your first program with class having main method.
- Data types & Wrapper classes
- Learn about primitive types in Java i.e. int, float, double, boolean, short, char
- You must be knowing which type can be used in which scenarios. Again, relate with real time scenarios like in cricket score, runs and wickets can be short while strike rate can be float.
- No need to remember range of these types but you should know capacity of each type in terms of bytes e.g. int takes 4 bytes.
- Java provides wrapper classes over primitives to make them behave like objects because there are certain limitations which makes primitive types more “Object Oriented” thing.
- You will understand usage of these classes once you start exploring other aspects of Java, so don’t hurry!
- Conditions, Operators, Keywords and Loops
- Lear how to do add conditions in java i.e. if-else, if-elseif-else. Try out different things with this condition like what is and what is not allowed in condition block.
- Know which are keywords and purpose of these keywords.
- Try and explore about loops know the difference between them, when to use which loops in program e.g. difference between while and do-while.
- Try conditional and shift operators (comparatively these operators are quite difficult to master but you’ll get to know the tricks)
- Collection framework
- This is actually a huge thing to master, so start with basic items like list, set and map. Check different types for each data structures.
- Identify the methods each interfaces provide, what algorithms are used behind the scene in these methods.
Worth to note that learning this items doesn’t mean you’re capable to work on real time projects as you have lot more to learn but this can definitely provide you a very good start.
Hope this helps!