---
title: Leaf class (computer programming)
slug: leaf-class-computer-programming
qid: 
snapshot: enwiki-001322953982
content_hash: 
license: CC BY-SA 4.0
source: https://en.wikipedia.org/w/index.php?oldid=1322953982
tags: [23468805, 28699009, 43573931]
---

# Leaf class (computer programming)

> [!note] Provenance
> Snapshot `enwiki-001322953982` · content root `…`
> Derived from <https://en.wikipedia.org/w/index.php?oldid=1322953982> · Licensed CC BY-SA 4.0

In class-based object-oriented programming languages, a leaf class is a class that should not be subclassed. This can be enforced either by convention, or by using a language feature such as the reserved words (keywords) final in C++, Dart, Java, and PHP, or sealed in C# and Scala. In Java 3D, the Leaf node is an abstract class for all scene graph nodes that have no children. Leaf nodes specify lights, geometry, and sounds. They specify special linking and instancing abilities for sharing scene graphs and provide a view platform for positioning and orienting a view in the virtual world.

In class-based object-oriented programming languages, a leaf class is a class that should not be subclassed. This can be enforced either by convention, or by using a language feature such as the reserved words (keywords) final in C++, Dart, Java, and PHP, or sealed in C# and Scala. In Java 3D, the Leaf node is an abstract class for all scene graph nodes that have no children. Leaf nodes specify lights, geometry, and sounds. They specify special linking and instancing abilities for sharing scene graphs and provide a view platform for positioning and orienting a view in the virtual world. ==References==
