What are the different types of classes in Java?

Any normal class which does not have any abstract method or a class that has an implementation of all the methods of its parent class or interface and its own methods is a concrete class.
Live Demo
public class Concrete { // Concrete Class
   static int product(int a, int b) {
      return a * b;
   }
   public static void main(String args[]) {
      int p = product(2, 3);
      System.out.println("Product: " + p);
   }
}
Product: 6
A class declared with abstract keyword and have zero or more abstract methods are known as abstract class. The abstract classes are incomplete classes, therefore, to use we strictly need to extend the abstract classes to a concrete class.
Live Demo
abstract class Animal { //abstract parent class
   public abstract void sound(); //abstract method
}
public class Dog extends Animal { //Dog class extends Animal class
   public void sound() {
      System.out.println("Woof");
   }
   public static void main(String args[]) {
      Animal a = new Dog();
      a.sound();
   }
}
Woof
A class declared with the final keyword is a final class and it cannot be extended by another class, for example, java.lang.System class.
Live Demo
final class BaseClass {
   void Display() {
      System.out.print("This is Display() method of BaseClass.");
   }
}
class DerivedClass extends BaseClass { //Compile-time error - can't inherit final class
   void Display() {
      System.out.print("This is Display() method of DerivedClass.");
   }
}
public class FinalClassDemo {
   public static void main(String[] arg) {
      DerivedClass d = new DerivedClass();
      d.Display();
   }
}
In the above example, DerivedClass extends BaseClass(final), we can't extend a final class, so compiler will throw an error. The above program doesn't execute.
cannot inherit from final BaseClass
Compile-time error - can't inherit final class
A class that contains only private variables and setter and getter methods to use those variables is called POJO (Plain Old Java Object) class. It is a fully encapsulated class.
Live Demo
class POJO {
  private int value=100;
  public int getValue() {
      return value;
   }
   public void setValue(int value) {
      this.value = value;
   }
}
public class Test {
   public static void main(String args[]){
      POJO p = new POJO();
      System.out.println(p.getValue());
   }
}
100
Static classes are nested classes means a class declared within another class as a static member is called a static class.
Live Demo
import java.util.Scanner;
class staticclasses {
   static int s; // static variable
   static void met(int a, int b) { // static method
   System.out.println("static method to calculate sum");
   s = a + b;
   System.out.println(a + "+" + b); // print two numbers
}
   static class MyNestedClass { // static class
      static { // static block
         System.out.println("static block inside a static class");
      }
      public void disp() {
         int c, d;
         Scanner sc = new Scanner(System.in);
         System.out.println("Enter two values");
         c = sc.nextInt();
         d = sc.nextInt();
         met(c, d); // calling static method
         System.out.println("Sum of two numbers-" + s); // print the result in static variable
      }
   }
}
public class Test {
   public static void main(String args[]) {
      staticclasses.MyNestedClass mnc = new staticclasses.MyNestedClass(); // object for static class
      mnc.disp(); // accessing methods inside a static class
   }
}
static block inside a static class
Enter two values 10 20
static method to calculate sum
10+20
Sum of two numbers-30
A class declared within another class or method is called an inner class.
Live Demo
public class OuterClass {
   public static void main(String[] args) {
      System.out.println("Outer");
   }
   class InnerClass {
      public void inner_print() {
         System.out.println("Inner");
      }
   }
}
Outer