Why not Constructor in Anonymous class in java?Its contradicting OOPs rule [closed]
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . The oops rule is "No class can exist without constructor".its ok.But in java Anonymous class can'never have its constructor.because it does not have any name. So it is contradict OOPS rule..I m really confused.Is it breaking OOPS rule?Please help 回答1: Actually, they have one implicit constructor. Suppose you