Method name interchange - public abstract or abstract public

前端 未结 5 1136
故里飘歌
故里飘歌 2020-12-20 12:12

I recently came across the following methods. I tried googling and did an example to see the difference by defining the methods as follows; both seems to be the same. But, i

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-20 13:13

    public abstract void methodName();
    abstract public void methodName();
    

    These two methods are same similar example is

    public static void main(String args[]);
    static public void main(String args[]);
    

    thus above two are same.It is just our wish how we want to write.

提交回复
热议问题