package com.di.ex01;
public class MessageBeanImpl implements MessageBean {
private String fruit;
private int cost;
public MessageBeanImpl() {}
public MessageBeanImpl(String fruit) {
super();
this.fruit = fruit;
System.out.println("- MessageBeanImpl(String) -");
}
public void setFruit(String fruit) {
this.fruit = fruit;
System.out.println("- setFruit() -");
}
public void setCost(int cost) {
this.cost = cost;
System.out.println("- setCost() -");
}
@Override
public void sayHello() {
System.out.println(fruit + '\\t' + cost);
}
@Override
public void sayHello(String a, int b) {
System.out.println(a + '\\t' + b);
}
}