View RSS Feed

My Java Tips

  1. Extract superclass

    by , 11-20-2011 at 05:49 PM (My Java Tips)
    Inheritance is a very useful feature that object oriented languages provide. Normally you write parent class first and then the child class. When the design of the application is not final, you tend to put more code in a class than required. At some instance, you realize, that you may make a super class and put some methods in it. Eclipse provide an easy way to do this.

    Lets take an example. We have following class:

    Java Code:
    public class CSVFile{