I want to include an interface Printable to this class but it is showing an error.
error:Class file collision: A resource exists with a different case:
'/example01/bin/com/example/test/test.class'.
This is my code
package com.example.test;
import com.example.test.Printable;
class A implements Printable {
public void a() {
System.out.println("a method");
}
@Override
public void b() {
}
}
abstract class B implements Printable {
public void b() {
System.out.println("b method");
}
}
class Call {
void invoke(Printable p) {// upcasting
if (p instanceof A) {
A a = (A) p;// Downcasting
a.a();
}
if (p instanceof B) {
B b = (B) p;// Downcasting
b.b();
}
}
}// end of Call class
class Test {
public static void main(String args[]) {
Printable p = new A();
Call c = new Call();
c.invoke(p);
}
}
This is my Printable interface class code
public interface Printable {
public void a ();
public void b();
}
So how can i import the interface Printable to this class any help would be appreciated. Thanks
but it is showing an errorWhat error?but it is showing an error- well ... which error?