只有A类和B类才能正常工作,但是当我添加C类时,它将不再返回值“Hello”。
A类:
public void firstName() {
Deco dec = new Deco();
x=dec.first;
System.out.println("value: "+x);
B级(装饰类):
public String firstOne(byte[] b) throws Exception {
if(xxx.equals(y)){
String first="Hello";
return(first);
}else{
System.out.println("Error");
}
C类:
public String test(String path, String name) {
decode = decode_text(get_byte_data(image));
Deco dec = new Deco();
dec.firstOne(decode);
}
答案 0 :(得分:0)
C类(或者我应该说方法C)看起来不会返回任何东西,可能是这样的:
public String test(String path, String name) {
decode = decode_text(get_byte_data(image));
Deco dec = new Deco();
return dec.firstOne(decode);
}