Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void countBladeren()
- {
- if (leftChild != null)
- {
- leftChild.countBladeren();
- System.out.println("LEFT != NULL");
- }
- if (rightChild != null)
- {
- rightChild.countBladeren();
- System.out.println("RIGHT != NULL");
- }
- if (leftChild == null && rightChild == null)
- {
- aantalBladeren++;
- System.out.println("RIGHT en LEFT == NULL");
- }
- }
- public int aantalBlad()
- {
- aantalBladeren = 0;
- countBladeren();
- return aantalBladeren;
- }
Advertisement
Add Comment
Please, Sign In to add comment