Win a copy of Rust Web Development this week in the Other Languages forum!

John Pike

Greenhorn
+ Follow
since Nov 11, 2013
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by John Pike

Thanks akash, campbell, chris for your humble and helpful replies. Happy to be at ranch. I will keep learning and disturbing you all at ranch:-)
8 years ago
Hi,

This is my first post at the ranch. I learnt a bit of c in my school. I am a newbie in android so I think java would help me understand programming android better. I got the book Head First Java and Java Language Specification. I started learning Head First Java in the beginning and found java very interesting and lovely. I thought that inheritance is primarily for code reuse but after search I found that its for polymorphism and composition should be used for code reuse. Also I thought of using a default implementation in interface and overriding them wherever necessary so that generic code is reused but came across the fact that interfaces don't implement the methods(but it seems to be available in java 8). I keep writing C in java . Most of the time whenever I come with a doubt I post them in StackOverflow but they say its bad OO design always and its not OOP and I get discouraged. So I turned to java ranch as I thought it will be a more friendly place. So what will be a good advice to start good programming practices in java. Do I need to study object oriented patterns before starting java or its a common problem faced by those coming from C. I fear if I start developing bad practices from beginning then it will hit me in the long run. So how can I change my mindset and program in java style? Any advice and link will be helpful.
8 years ago