Home / Java Classes / How to Use Final Class in Java In this example we will show the method to use final class in Java. Source Code package com.beginner.examples; final class FinalClass { // final class public static void main(String[] args) { System.out.println("OK"); } } Output: OK