Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cannot be instantiated

 
Anthony Smith
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JimiSingleImageRasterEncoder encoder = new JimiSingleImageRasterEncoder();
JimiRasterImage raster = Jimi.createRasterImage(image.getSource());
Those are the two lines in my program.
It says for this statement:
JimiSingleImageRasterEncoder encoder = new JimiSingleImageRasterEncoder();
It cannot be instantiates.
What do I do?
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is JimiSingleImageRasterEncoder abstract?
Is there a constructor in your class that takes NO parameters?
If there are constructors that take parameters - the compiler will no longer automatically supply one that takes none.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic