Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132948 views
License: OTHER
1
public class Tree {
2
/*
3
* Usually, you would use an array for this, but I wanted to keep it simple.
4
*/
5
6
/** A leaf of this tree */
7
Leaf leaf1;
8
9
/** Theoretically, you should make those comments over every line */
10
Leaf leaf2;
11
Leaf leaf3;
12
Leaf leaf4;
13
Root mainRoot;
14
15
/** age in years */
16
int age;
17
18
/** name of this tree in English */
19
String name;
20
21
/** scientific name of this type of tree in Latin */
22
String scientificName;
23
24
}
25