java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.awt.Dimension;

Coderanch | Stevens Miller | 1 year ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    ClassCastException when generic parameter made into varargs.

    Coderanch | 1 year ago | Stevens Miller
    java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.awt.Dimension;

    Root Cause Analysis

    1. java.lang.ClassCastException

      [Ljava.lang.Object; cannot be cast to [Ljava.awt.Dimension;

      at classcast.ConcreteStrategy.execute()
    2. classcast
      Main.main
      1. classcast.ConcreteStrategy.execute(Main.java:24)
      2. classcast.Context.<init>(Main.java:15)
      3. classcast.Main.main(Main.java:7)
      3 frames