public void paint(Graphics g)
       {
           ImageIcon bild;
           	   try{
           	       
           	       
           	       
           bild=ImageIO.read(new File("bmi.jpg"));
       } 
       catch(IOException eio){
           System.out.print(eio.toString());
       }
       g.drawImage(bild,50,50,200,200,this); 
    }
	import java.io.File:
	 public void paint(Graphics g)
       {
        {
           BufferedImage bild;
 
               try{
 
                   
                   
                   
           bild=ImageIO.read(new File("bmi.jpg"));
 
       } 
 
 
       catch(IOException eio){
 
           System.out.print(eio.toString());
 
       }
 
       g.drawImage(bild,50,50,200,200,this); 
    }
    }
	public class Test {
    public static void main(String[] args) {
        int a;
        try { a = 4; } catch(Exception e) {}
        System.out.println(a); // a mglw. nicht initialisiert wenn Exception
        
        int b = 2;
        try { b = 4; } catch(Exception e) {}
        System.out.println(b); // b hat auf jeden Fall einen Wert
    }
}