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

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

Moderator: admin

Post Reply
devlam
Posts: 50
Joined: Sun Nov 10, 2013 4:39 am
Contact:

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

Post by devlam »

The only problem is that you can't implement different implementations m1, 1 for T1 and 1 for T2.
How do you solve that problem if your class must implement two interfaces which have the same method and you want a different implementation for each.

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

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

Post by admin »

You can't.
If you like our products and services, please help us by posting your review here.

barrantesgerman
Posts: 3
Joined: Sun Feb 07, 2021 2:58 pm
Contact:

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

Post by barrantesgerman »

Code: Select all

//Filename: TestClass.java
class TestClass implements T1, T2{
The class must be public, because the file name is the same as the class.

Code: Select all

//Filename: TestClass.java
public class TestClass implements T1, T2{
Correct answer: None of the above.

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

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

Post by admin »

>The class must be public, because the file name is the same as the class.

Where did you read that?

The rule is, a public class must be in a file by the same name.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 66 guests