java - ImageIO cannot resolve to a type -
just simple programming question.
import java.awt.image.bufferedimage; import java.io.file; import java.io.ioexception; public class readthepic { public static void main(string[] args){ bufferedimage img = null; try { img = imageio.read(new file("strawberry.jpg")); } catch (ioexception e) { } } }
error: imageio cannot resolved type. why?thanks
import javax.imageio.imageio;
imageio not accessible due restriction on requiered library
you forgot import class.
add import javax.imageio.imageio
after other imports , should work.
Comments
Post a Comment