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

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
piotrkmiotczyk
Posts: 27
Joined: Mon Sep 22, 2014 1:30 pm
Contact:

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

Post 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.

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

Yes, that is correct. Subclassing is another term that means the same as extending.
If you like our products and services, please help us by posting your review here.

Aditya553
Posts: 15
Joined: Sun Aug 06, 2017 2:37 am
Contact:

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

Post by Aditya553 »

what about private class?

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

What happened when you tried it out?
If you like our products and services, please help us by posting your review here.

Aditya553
Posts: 15
Joined: Sun Aug 06, 2017 2:37 am
Contact:

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

Post by Aditya553 »

admin wrote:What happened when you tried it out?
ok so the outer class cannot have private modifier

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests