public class TestCast{
private static final char TEST_CHAR = 'A';
public TestCast(){}
public boolean test(String testVer){
System.out.println (testVer + " is a String!");
return true;
}
public boolean test(int testVer){
System.out.println (testVer + " is a int!");
return true;
}
public boolean test(char testVer){
System.out.println (testVer + " is a char!");
return true;
}
public boolean cast(String testVer){
System.out.println (testVer + " can cast to String!");
return true;
}
public boolean cast(int testVer){
System.out.println (testVer + " can cast to int!");
return true;
}
public static void main(String[] args){
TestCast test = new TestCast();
test.test(TEST_CHAR);
test.test(TEST_CHAR + "");
test.cast(TEST_CHAR);
}
}