new Scalar[numberOfRows][numberOfCols]will not work !!!
This is because the operator new is a run-time operation and Java 1.5 removes all generics typing at compile-time.
This is the well-known generic array creation, an operation not supported by Java 1.5.
You'd better use
(Scalar[][]) new Object[numberOfRows][numberOfCols]
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment