This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 21st, 2013  |  syntax: Java  |  size: 0.37 KB  |  views: 358  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. import java.util.ArrayList;
  2.  
  3. public class Category {
  4.         ArrayList<Category> childs;
  5.         private String name;
  6.        
  7.         public Category(String name) {
  8.                 this.name = name;
  9.                 childs = new ArrayList<Category>(0);
  10.         }
  11.        
  12.         public Category(String name, ArrayList<Category> childs) {
  13.                 this.name = name;
  14.                 this.childs = childs;
  15.         }
  16.        
  17.         public String getName() {
  18.                 return name;
  19.         }
  20. }
clone this paste RAW Paste Data