Ravi KumarJd wrote:Great answer - Thank you. I agree with you we cannot import instance methods or attributes directly with import statement. I wondered why the compiler not stopping me, when I append .* after a concrete class. If I understand correctly, for non static concrete Types/classes it's NOT better to append .* after the class name though the compiler okay.
If TestClass contained a static nested class or an enum, you could have imported them (as types) with import package2.TestClass.*;