Yes, you can learn to code in Java while making Android M phone and wearable apps.
Learn to create Android M (Marshmallow) apps from scratch using Java. Don’t know Java? No problem as the first module in this course is a Java introductory course for total beginners. Already know Java? Then use the module as a quick review or skip it and jump right in learning about Material Design, ListViews, Networking, Location, Databases and Android Wear Cards. The course includes 5 Real-World apps fully explained and built from the ground up + the Wearable API so that you can code your own smart watch apps.