Exclude objects of a subclass in a forEach

后端 未结 0 1390
醉梦人生
醉梦人生 2021-02-05 06:13

Let A be a class and A1,A2,A3 subclasses. I want to make a forEach that goes through elements of A but excludes all A3 elements. I tried to put an if(!(a3 instanceof A3)) but it

相关标签:
回答
  • 消灭零回复
提交回复
热议问题