MCQs>IT & Programming>Java>What's wrong with the following method: public static int getSize(){ int temp = super.getSize(); if(temp==0) temp=this.size; return temp; }
Java MCQs
What's wrong with the following method: public static int getSize(){ int temp = super.getSize(); if(temp==0) temp=this.size; return temp; }
Answer
Correct Answer: static methods cannot refer to "this" or "super"
Explanation:
Note: This Question is unanswered, help us to find answer for this one