Is there a difference from the  class field and getClass()  ?

To get the url of an image, I have developed the code below which works fine. In fact I, used a few examples that I got from this forum without understanding what I'm doing.
public java.net.URL getURL(String name)
    String n = name.trim();
       if (n == null || n.equals(""))  return null;
    java.net.URL url=null;
    try
         return TestImage.class.getResource("/" + n);
   catch (Exception ex)
          System.out.println(ex.toString());
          return null;
}However, now to really understand what all this means, I'd like to know what is the class field. For example when I'm writting :
      TestImage.class.getResource("/" + n);what "class" refers to ? Is it the same as
      TestImage.getClass().getResource("/" + n);I'm wondering what is the class field because by looking for the javadoc for Class, or Object, I haven't found any such field name. Where is it documented ? Instead could I have written :
       Class.getResource("/" + n);

This expression is true :
String.class.equals("A string".getClass())So basically it is the same, except that getClass() is not static.
Hope this helps,
--Marc (http://jnative.sf.net)                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • What is the difference from the creative cloud and having the lightroom and Photoshop?

    what is the difference from the creative cloud and having the lightroom and Photoshop?   I thought i was purchasing the lightroom and photoshop, but now I'm not sure that i got the right product because it only says i have creative cloud. Is there a way to change products without penalty

    Hi Jessica,
    The creative cloud complete plan has all the applications including Lightroom and Photoshop and there is a Photography plan which only includes Photoshop and Lightroom.
    Creative Cloud pricing and membership plans | Adobe Creative Cloud
    For switching the plan, please contact the support through call/chat:
    Contact Customer Care
    Regards,
    Sheena

  • Is there a difference between the earphone output and the audio output of the docking connector, or is it in fact the same signal ?

    Is there a difference between the earphone output and the audiooutput of the docking connector of the iphone 4, or is it in fact the same signal ?

    One basic difference is that the LTE frequencies each is able to operate on are different. After that, it is pretty much the same phone. Others might be able to add to this.

  • Is there any difference between the commerical product and the Teacher/Student version?

    In Adobe Photo Shop Elements 13 and Premiere Elements 13 is there any difference between the commerical product and the Teacher/Student version? I don't remember them having two versions in the past.

    Is there a difference? Sure. Will it be noticable? Maybe.
    The 9i client will use one of the 9i ODBC drivers. The 8i client will use one of the 8i ODBC drivers. The 9i drivers will generally have more bug fixes & more features than the 8i drivers. It is possible, though rare, that the 9i drivers will fix a bug whose behavior your application was dependent on and/or introduce bugs that were not in the earlier version. Of course, you have to consider the different features of the underlying clients as well-- i.e. a 9.2 Oracle client cannot communicate with a 7.3.4 database, an 8i client doesn't know how to handle data types introduced in 9i (i.e. TIMESTAMP), etc.
    Justin

  • Is there a difference between the LG EnV3 and the LG EnV3 VX9200 is this the same phone. the reason I ask is because one says it has internet access and the other one doesn't

    is there a difference between the LG EnV3 and the LG EnV3 VX9200 is this the same phone. the reason I ask is because one says it has internet access and the other one doesn't

    It the same phone but you don't have to have data on it if you don't want since they are older phones.  We had these phones without data as I didn't think they would be good for surfing the net compared to a smart phone.  Mary

  • Is there a difference in the iphone 5 and iphone 5s case?

    is there a difference in the iphone 5 and iphone 5s case?is there a difference in the iphone 5 and iphone 5s case?

    Could you repeat that? 
    Yes, depending on the case, there are differences.  Camera opening, access to the fingerprint scanner, etc.

  • Is there any difference between the old iPod and the new one?

    Hello everyone,
    first of all i'd like to thank you for reading my post:)
    My question is a simple one, i bought the new iPod Video 30 GB, and i came across a couple of questions while i was heading home with my new toy.
    How can i actually see the difference between this my new iPod and the one that they where selling before?
    Is there any visible difference amongst those two that i can notice?
    Thanks once again.

    Hello everyone,
    first of all i'd like to thank you for reading my
    post:)
    My question is a simple one, i bought the new iPod
    Video 30 GB, and i came across a couple of questions
    while i was heading home with my new toy.
    How can i actually see the difference between this
    my new iPod and the one that they where selling
    before?
    Is there any visible difference amongst those two
    that i can notice?
    The new update has a scroll feature on it to make it easier to search for songs on your ipod. It also lets you control the maximum volume your ipod can reach. It has better video quality as well. It lets you play games on your ipod (you have to download them from the Muisc Store)
    and thats about it! Have fun with your new ipod!
    kEat0n

  • What are the major differences from the Z77A-G41 and the G45 MB

    I bought a supposedly new, never used, yeah buyer beware, MSI LGA Z77A-G41 through Ebay. Noticed after the build a popping from the audio and now getting RF static(HD drive electronic noise) through the rear audio port. So  I was trying to find a "NEW" G41 which are now out of stock or ridiculously overpriced. So if I can't buy a G41, how is the G45 in comparison? Do I have to totally do a fresh install or are the G41 and G45 drivers close to not have to do this? I will probably buy a MSI Z77A-G45 re-furb from MSI; just wanted to know the differences ...
    Thanks
    Ron

    There are just minor differences. The G41 a cut down board while G45 is a better equipped board. Only advantage of G41 is offering PCI slots for older sound cards and such while G45 just offers PCI-Express. Only G45 offers SLI support and therefor slots for vga cards able to run x8/x8 and better vrm cooling. G45 is the better and therefor higher priced board.
    No fresh install is needed when replacing the G41 with a G45 because both are Z77 boards and drivers are identical.

  • Is there a difference between the macbook air and the macbook pro?

    i know the specs but are there some differences where you can tell me about??

    The differences are pretty obvious if you've read the technical specifications comparison. Which MacBook Pro are you comparing the MacBook Air against? There are additional differences if you're comparing between 13, 15 or 17" models.
    The most obvious differences:
    Optical Drive
    Ethernet port
    FireWire port
    i5/i7 CPU architecture
    Dedicated GPU (15 & 17 MBP)
    RAM and HDD upgradeability
    Backlit keyboard

  • Is there a difference between the us version and the european  of the iphone 5

    i bought a iphone5 from best buy it came with an european charger
    is this phone the same as the us version ?

    One basic difference is that the LTE frequencies each is able to operate on are different. After that, it is pretty much the same phone. Others might be able to add to this.

  • HT203160 is there a difference between the apple ID and the itunes password?

    hello there!
    i want to restore my ipod shuffle (on the computer) but they ask me an ITUNES password, i don't know what i have to do, as i write my apple ID and is reject.
    I don't remember another password for apple. I just have my apple ID and is working on my computer or my iphone, but with the ipod doesn't work.

    Refurbished I would suggest - refurbished products have slightly different product codes.
    AC

  • Capture value from the input field

    Hello All,
            I'm new to BSP.
    I have a small querry.
    I have a input field.
    beside this a push button.
    if i enter a value in the input field and press the push button, i need to capture the value from the input field and pass it to a variable contained in a class.
    i'm attaching the layout code here.
    but i'm not knowing what to write in the event(on input processing)
    <u><b>Layout code &#61664;</b></u>
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title        = "Page to take the value from the screen and pass to the class "
                  marginBottom = "100"
                  marginLeft   = "250"
                  marginRight  = "100"
                  marginTop    = "100"
                  scrolling    = " AUTO" >
        <htmlb:form>
          <htmlb:tray id        = "tray1"
                      hasMargin = "TRUE"
                      title     = "Value Capture"
                      width     = "350" >
            <htmlb:textView text      = "Enter a value"
                            design    = "emphasized"
                            textColor = "negative" >
            </htmlb:textView>
            <br>
            <htmlb:inputField alignment = "left"
                              id        = "gv_var"
                              required  = "true"
                              type      = "STRING"
                              design    = "standard" />
            <htmlb:button design  = "emphasized"
                          id      = "button"
                          text    = "SUBMIT"
                          onClick = "btn_click" />
            </br>
          </htmlb:tray>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    eventhandler&#61664;on input processing code
    DATA: event TYPE REF TO if_htmlb_data.
    event = CL_HTMLB_MANAGER=>get_event_ex( request ).
    IF event->EVENT_NAME = 'button' AND event->EVENT_TYPE = 'click'.
        ENDIF.

    HI BSPian,
        htmlb:inputField value = "<%= v_value %>"
                         id = "gv_var"
                         required = "true"
                         size = "10"
                         type = "STRING"
                         maxlength = "10"
                         design = "standard" />
    Here u mean to say that v_value must be one more field type string. is it so ?
    But i want to see the value in the same input field
    id ="gv_var". i.e if i enter the value "BSPian" in the input field and press "submit" the internal processing will be done as told by u and after that ,on the screen i want to keep that value till i end that session.
    i passed a variable v_value in the inputfield value but it's not working ..
    regards,
    deepu.

  • Is there any difference between the iPad and iPhone cables?

    Alot of people are mentioning that there's difference with the speed while syncronising/backup. I am just wondering is there any difference between the cables? and how can I distinguish it? Coz I have most of the i- products and I have just mixed up all the cables >__< Thank you!

    I can confirm that iPad/iPod cables are identical. Don't know about iPhone. IF there is a difference, you'll know immediately - function or functions won't work.
    There will be NO speed difference. Either the copper is present or it isn't and copper is copper.

  • Difference between the document total and its components in inventory transfer

    Hi Everyone!
    When I make Inventory Transfer, SAP notice error "There is difference between the document total and its components.".Everyone that knows this problem, Pls help to find way to solve it.
    Thanks & Best regards
    Ngoc Loan

    Hi,
    Please refer to the thread.
    There is a difference between the document total and its components
    Hope Helps!
    Regards,

  • Difference between the  5 ghz and the 2.4 ghz network on the Airport Extreme

    Strenght signal-wise, is there a difference between the  5 ghz and the 2.4 ghz network on the Airport Extreme?
    Is the 5 ghz network on the Airport Extreme the 802.11n signal that is supossed to have better speed and strenght than the 802.11g spec?
    I am confused because I can not tell the difference in performance between both signal on my new A.E.

    The laws of physics always dictate that in order to gain something....let's say speed....you have to give up something else.
    In return for higher speed capabilities, 5 GHz signals are not as strong as 2.4 GHz signals, so they do not travel as far, or penetrate obstructions as well as 2.4 GHz signals.
    If your Mac is in close proximity to the AirPort Extreme, it will probably connect to the 5 GHz band. If you take your Mac to the other end of the house, it will probably connect to the 2.4 GHz band. The point is, the Mac will choose the best signal quality and connect automatically based on its location in relation to the AirPort Extreme.
    If you are curious to know which band the Mac is connecting to at an given time, hold down the option key on your Mac while you click on the fan shaped AirPort icon and look for the Channel setting. You will see either 2.4 GHz or 5 GHz displayed.

Maybe you are looking for