Run Code  | Code Wall  | Users  | Misc  | Feedback  | About  | Login  | Theme  | Privacy 

Java tree

Language: Editor: Layout:
+ ] Show input
Compilation time: 0.93 sec, absolute running time: 0.16 sec, cpu time: 0.16 sec, memory peak: 18 Mb, absolute service time: 1,17 sec 
fork mode |  history  | discussion
Error(s), warning(s):
source_file.java:30: warning: [rawtypes] found raw type: MyTreeNode
        for(MyTreeNode node : root.getChildren()) {
            ^
  missing type arguments for generic class MyTreeNode<T>
  where T is a type-variable:
    T extends Object declared in class MyTreeNode
source_file.java:38: warning: [rawtypes] found raw type: MyTreeNode
    private List<MyTreeNode> children = new ArrayList<>();
                 ^
  missing type arguments for generic class MyTreeNode<T>
  where T is a type-variable:
    T extends Object declared in class MyTreeNode
source_file.java:39: warning: [rawtypes] found raw type: MyTreeNode
    private MyTreeNode parent = null;
            ^
  missing type arguments for generic class MyTreeNode<T>
  where T is a type-variable:
    T extends Object declared in class MyTreeNode
source_file.java:45: warning: [rawtypes] found raw type: MyTreeNode
    public void addChild(MyTreeNode child) {
                         ^
  missing type arguments for generic class MyTreeNode<T>
  where T is a type-variable:
    T extends Object declared in class MyTreeNode
source_file.java:56: warning: [rawtypes] found raw type: MyTreeNode
    public void addChildren(List<MyTreeNode> children) {
                                 ^
  missing type arguments for generic class MyTreeNode<T>
  where T is a type-variable:
    T extends Object declared in class MyTreeNode
source_file.java:57: warning: [rawtypes] found raw type: MyTreeNode
        for(MyTreeNode t : children) {
            ^
  missing type arguments for generic class MyTreeNode<T>
  where T is a type-variable:
    T extends Object declared in class MyTreeNode
source_file.java:63: warning: [rawtypes] found raw type: MyTreeNode
    public List<MyTreeNode> getChildren() {
                ^
  missing type arguments for generic class MyTreeNode<T>
  where T is a type-variable:
    T extends Object declared in class MyTreeNode
source_file.java:75: warning: [rawtypes] found raw type: MyTreeNode
    private void setParent(MyTreeNode parent) {
                           ^
  missing type arguments for generic class MyTreeNode<T>
  where T is a type-variable:
    T extends Object declared in class MyTreeNode
source_file.java:79: warning: [rawtypes] found raw type: MyTreeNode
    public MyTreeNode getParent() {
           ^
  missing type arguments for generic class MyTreeNode<T>
  where T is a type-variable:
    T extends Object declared in class MyTreeNode
9 warnings


Child1
Child2
Child3
Child4
Child5
Child6