Reading an image from a file

suggest change
import java.awt.Image;
import javax.imageio.ImageIO;

...

try {
    Image img = ImageIO.read(new File("~/Desktop/cat.png"));
} catch (IOException e) {
    e.printStackTrace();
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


File I/O:
*Reading an image from a file

Table Of Contents
7File I/O
96XJC
122JNDI
150JMX