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.
			
			
									
									
						About Question com.enthuware.ets.scjp.v6.2.473 :
Moderator: admin
- 
				devlam
 - Posts: 50
 - Joined: Sun Nov 10, 2013 4:39 am
 - Contact:
 
		Online		
	- 
				admin
 - Site Admin
 - Posts: 10443
 - Joined: Fri Sep 10, 2010 9:26 pm
 - Contact:
 
- 
				barrantesgerman
 - Posts: 3
 - Joined: Sun Feb 07, 2021 2:58 pm
 - Contact:
 
Re: About Question com.enthuware.ets.scjp.v6.2.473 :
Code: Select all
//Filename: TestClass.java
class TestClass implements T1, T2{Code: Select all
//Filename: TestClass.java
public class TestClass implements T1, T2{
		Online		
						
						
		
				
		
		
	- 
				admin
 - Site Admin
 - Posts: 10443
 - Joined: Fri Sep 10, 2010 9:26 pm
 - Contact:
 
Re: About Question com.enthuware.ets.scjp.v6.2.473 :
>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.
			
			
									
									
						Where did you read that?
The rule is, a public class must be in a file by the same name.
Who is online
Users browsing this forum: No registered users and 24 guests