Page 1 of 1

About Question com.enthuware.ets.scjp.v6.2.171 :

Posted: Thu Sep 25, 2014 2:32 pm
by piotrkmiotczyk
Which one of these is a proper definition of a class TestClass that cannot be sub-classed? (choose one)
final class TestClass { }
abstract class TestClass { }
native class TestClass { }
static class TestClass { }
private class TestClass { }

Answer is 1.
My question is: does 'subclassing' a class mean exactly the same as extending it?

Thanks.

Re: About Question com.enthuware.ets.scjp.v6.2.171 :

Posted: Thu Sep 25, 2014 11:46 pm
by admin
Yes, that is correct. Subclassing is another term that means the same as extending.

Re: About Question com.enthuware.ets.scjp.v6.2.171 :

Posted: Tue Aug 15, 2017 1:49 am
by Aditya553
what about private class?

Re: About Question com.enthuware.ets.scjp.v6.2.171 :

Posted: Tue Aug 15, 2017 2:27 am
by admin
What happened when you tried it out?

Re: About Question com.enthuware.ets.scjp.v6.2.171 :

Posted: Tue Aug 15, 2017 4:19 am
by Aditya553
admin wrote:What happened when you tried it out?
ok so the outer class cannot have private modifier