Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Syntax question: what does XXX.class.YYY mean?

800295Oct 16 2007 — edited Oct 16 2007
public class FrameDemo2 extends WindowAdapter implements ActionListener {
.....
    protected static Image getFDImage() {
        java.net.URL imgURL = FrameDemo2.class.getResource("/components/images/FD.jpg");
        if (imgURL != null) {
            return new ImageIcon(imgURL).getImage();
        } else {
            return null;
        }
    }
.....
}
I am reading a online tutorial, I would like to ask what does xxx.class.yyy mean? where does the method getResource call from?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 13 2007
Added on Oct 16 2007
6 comments
845 views