I'm working on image processing with java but the BufferedImage is not resolved and the compiler yells "BufferedImage cannot be resolved to a type".
How to fix that?
Here is my code:
import javax.imageio.*;
public class Main {
public static void main(String[] args){
BufferedImage img = null;
}
}
I tried to resolve that issue but nothing changed
CodePudding user response:
That's because you are importing javax.imagio.*
, but you should be importing java.awt.image.*
.
https://docs.oracle.com/javase/7/docs/api/java/awt/image/BufferedImage.html