到目前为止,我的代码如下所示:
public class Tree {
public static void main (String[] argv) {
int serial; //create parameters
double circumference;
String species;
}
public Tree(int serial, double circumference, String species) {
String.format("Tree number %d has a circumference of %.2f and is of species %s.",
serial, circumference, species);
}
}
我不确定如何制作一个以非常特定的格式describe()
返回带有树信息的方法。String