What does "this" represent ?

Hello NGs,
I found this applet in one of the tutorials:
"import java.awt.Point;
class NamedPoint extends Point {
String name;
NamedPoint(int x, int y, String name) {
super(x,y);
this.name=name;
public static void main(String[] arguments) {
NamedPoint np = new NamedPoint(5,5,"SmallPoint");
System.out.println("x is "+np.x);
System.out.println("y is "+np.y);
System.out.println("Name is "+np.name);
Now, this works fine. But I was trying to understand how the "this."instruction in line 6 works.
If I try replacing it by "NamedPoint.name" or "NamedPoint(x,y,name).name" or anything I could think of, I get an error message from the compiler saying that he cannot find the variable.
The question ist: what EXACTELY does "this" represent in this case ? By what could I replace it to achieve the same result ?
Thanks.

In this case u need this to tell the compiler what you are talking about, cause you've got a field name in the class-definition and an parameter name in the constructor. so usually it's enough if u write:
name=...; But as we have a name conflict here, you have to qualify the field name with this. In general this is the "self-reference" and super is the "reference to the super-class". You can't write NamedPoint.name here cause name isn't a static field. you could make it static though, by replacing the name declaration with this: static String name;

Similar Messages

  • All my audio waveforms in FCPX have a lighter-colored, secondary waveform in the background.  What does this represent?

    ssia

    They're called references waveforms. You can switch them on and off in the editing tab of preferences. They show you the full height of the waveform with spikes making ti easier to see the content when the sound levels are reduced and the full waveform is very small.

  • Wl6 Admin - Cluster - Cluster Address - What does this tab represent?

    In the WL6.0Sp1 Admin Console, at cluster creation time, a Cluster address
              is required. What does this cluster address represent?
              Heres what WL6 documentation says
              (http://edocs.beasys.com/wls/docs60/ConsoleHelp/cluster.html#create_cluster)
              Cluster Address - This attribute returns the address to be used by clients
              to connect to this cluster. This address may be either a DNS host name that
              maps to multiple IP addresses or a comma separated list of single address
              host names or IP addresses.
              We created a cluster of 4 WL6 servers, 3 on Multi-homed Win2K with static
              ip's and one on a single-homed Win2k m/c. Our Enterprise appplication (ear)
              is targetted at the cluster only, not individual m/c's in the cluster.
              Initially, the Cluster Address was specified as all the ip addresses. Then
              we specified only one ip address in the Cluster Address tab. Yet, in both
              the above cases, we were able to access our application by hitting any of
              the 4 ip's in the cluster. The clustering algorithm was set to
              "Round-Robin".
              And in both cases (single ip address and 4 ip addresses in Cluster address
              tab), the cluster monitor on the Admin console was showing all four WL6
              server instances participating in the cluster! We also tried a DNS name that
              mapped to the Ip addresses and again all 4 instances were shown to be
              participating in the cluster.
              I have two questions
              1) What exactly is the significance of the Cluster Address tab?
              2) How do we know which WL6 server instance is being accessed at which
              client request. With round robin, will each of the 4 WL6 instances be
              accessed once every 4 requests? How do we monitor/verify this, either via
              console or via log files?
              Thanks in advance for help/clarifications.
              Regards,
              Nitin
              

    thank you thank you for taking an interest. this is so frustrating.
    i only have apple keyboard, mighty mouse, and 20 inch cinema display connected. this morning took out memory and tried to boot up with individual pairs in the first bank. first the (2)256, the (2) 1g, and then the other (2) 1g modules. everytime I get the weird fuzzy wheel under the logo after a while, black screen flashes, then grey apple logo fuzzy screen then black forever.
    I ran tiger updates this morn. still will only boot to safe mode. then tried to run leopard disk to install it
    will not boot from leopard disk.
    tried safe boot, then doulble click install leopard, restart, then the saga repeats with the pixely red square around the wheel.
    these are fresh drives with only what came on instll disk loaded.
    thanks again for taking an interest.
    i love this system(well at least i did). I want to install leopard on my powerbook too but am terrified to do so right now since it is working and I have work to do. Can't afford to have no computer to do my work on...self employment is great?!
    This is making me crazy. I anxiously await your words of wisdom.

  • HT1386 what does "other" represent under capacity?

    What does "OTHER" represent under capacity?

    Hi All,
    I have been facing the same issue and found a solution that does not require a full restore!
    Its seems to be related with the music synchronization mechanism
    Here is a link to a very usefull documentation that describe what I did to resolve my issue!
    http://www.ipodrepublic.com/iphone/fixing-issue-other-files-iphone-memory/2010/0 3/31/
    Hope this help.

  • What does this mean:Photoshop 13.1.2 for Creative Cloud Installation failed. Error Code: U44M1P7

    What does this mean:Photoshop 13.1.2 for Creative Cloud Installation failed. Error Code: U44M1P7
    I found the manual update, which worked!
    http://www.adobe.com/support/downloads/thankyou.jsp?ftpID=5595&fileID= 5604

    Hi Barbara,
    For failed 13.1.2 update error U44M1P7, Please refer to the solution mentioned in the following threads :
    http://forums.adobe.com/message/5396792#5396792
    http://forums.adobe.com/message/5409050#5409050

  • Why has my monitor suddenly begun to have a moiré pattern all over – it is even showing up on my icons on the dock? It appears to be very thin bright green vertical lines. I have a 2008 iMac which is running 10.6.8. What does this mean?

    Why has my monitor suddenly begun to have a moiré pattern all over – it is even showing up on my icons on the dock? It appears to be very thin bright green vertical lines. I have a 2007 iMac which is running 10.6.8. What does this mean? I've attached some screen shots below.
    Also experiencing some funky issues with my wireless keyboard. With new batteries, it will just stop functioning. Certain keys intermittently won't work. Also the fans go on as soon as I turn the computer on - some times they stay on and sometimes they don't. Ever since upgrading the operating system - I've been having many issues with this iMac. Not happy. Any answers out there?

    Thanks for your reply LexSchellings, There is no disc in the drive and I went through the suggestions you put forward on the phone with Apple support without any luck. I can put a disc in but it pops straight back out again without registering on finder.
    The idea of using an external drive was to enable me to avoid the cost and loss of productivity whilst machine in repair... if I have to take it in to get the old drive removed than I might as well have a new internal drive put in, although I do worry about the reliability of these apple drives given my experience with this one coupled with my limited online research ... on line forums seem to be full of people with the same problem (although perhaps searching such forums is bound to make it seem a common problem as users with perfectly working machines are less likely to post (?)) Your reply suggests that no external drive will work whilst the existing drive is in place.
    As a postscript: I do realise that this is a user forum ...my secondary question was asking if anyone knows how to put forward a case/complaint to Apple... I can't find a link on the support page that would enable me to do so and I was wondering if anyone on this user forum had any ideas/experience..

  • When trying to update my IPad apps I am getting the message "Your Apple ID has been disabled". Still have more than 50$ in my account, so what does this mean ?  What can I do to get my ID enabled again ?

    when I am trying to download IPad updates I get the message "Your Apple ID has been disabled". What does this mean? How do I get my ID enabled again? Still got more than 50$ in my account !

    Reset your Apple ID password here >  Apple - My Apple ID
    More information here >  Apple ID: "This Apple ID has been disabled for security reasons"  appears

  • I'm trying to upgrade to Mountain Lion and I get an error message that says "server error during download; 403 forbidden. What does this mean, what can I do? I had no problem downloading Lion.

    Trying to upgrad to Mountail Lion and got an error message : 403 Forbidden. What does this mean? What can I do? I had no problem when I upgraded to Lion.

    403 Forbidden HTTP status code in response to a request from a client for a web page or resource to indicate that the server refuses to allow the requested action. In other words, the server can be reached, but the server declined to allow the requested access.
    http://en.wikipedia.org/wiki/HTTP_403
    Could you be using a different Apple ID oe such?

  • I am suddenly unable to open my pictures in Adobe Photoshop. It gives the following message: The document "Tina-19.jpg" could not be opened. Photoshop cannot open files in the  "Adobe Photoshop JPEG file" format. What does this mean? I have opened my phot

    I am suddenly unable to open my pictures in Adobe Photoshop. It gives the following message: The document “Tina-19.jpg” could not be opened. Photoshop cannot open files in the  “Adobe Photoshop JPEG file” format.
      What does this mean? I have opened my photos in Adobe Photoshop for years and suddenly I get this message and can't open any of my pictures

    JoeLib wrote:
    You type way faster than me Gene.
    Well, not necessarily in this case.
    According to the time stamp, Gene posted his answer a bit over three hours before you did, Joe.
    Gene's post:       Dec 29, 2014 5:54 PM
    Joe's post:          Dec 29, 2014 8:57 PM

  • What does this message mean:  this apple ID has not yet been used in the iTunes store"? I cant connect using my iphone. But it works in iTunes on my laptop.

    what does this message mean:  this apple ID has not yet been used in the iTunes store"? I cant connect using my iphone. But it works in iTunes on my laptop.

    FAQ apple id http://support.apple.com/kb/HT5622?viewlocale=en_US
    http://support.apple.com/kb/HT1311

  • What does this message mean?  "ITunes has fetected an iPad in recovery mode.  You must restore this iPad before it can be used with ITunes".

    What does this message mean?  "itunes has detected an iPad in recovery mode.  You must restore this iPad before it can be used with ITnes."  How do I restore when every time I connect to my computer I get this message?

    Perhaps the information in this Apple support article will help:
    http://support.apple.com/kb/TS3694#error3004
    Regards.

  • What does this message mean Charging is not supported with this device?

    What does this message mean Charging is not supported with this device?

    You've gotten 2 good answers already, but there's a key assumption in both that you got the message when connecting the iPhone to some other device. If this is the case you can get an adapter in the Apple online store that will allow charging from older devices.
    If, however, this message appears when you are not connected to anything the problem is dirt or moisture in the dock connector at the bottom of the phone. Clean it with a dry toothbrush or air blast.

  • What does this message mean when i dial

    What does this verizon message mean?
    'your call cannot be completed as dialed'
    i got a number on my caller id from my ex's neighborhood
    609-424-xxxx
    its not his (old, home) number, but i am concerned that he got a new number or maybe called from a pay phone--
    he has a history of psychological abuse
    i tried calling the number back from a pay phone from the next county to see if i could find out thatit wasn't him to put my mind at ease..
    but i got the above message
    i dialed the number that was on my caller ID
    would this message come up if it were a payphone that does not take incoming calls?
    why else would i get the message.
    thats the number that came into my caller id, but i am told it can't be completed as dialed..
    i was calling from the 732 area code and did use the full number with the area code
    i tried googling the number and doing a reverse look up
    we live far apart--i don't know anyone else in his town--its too much of a coincidence to just be a wrong number
    there is not enough to file a police report yet

    This seems to suggest that it could be filenames… (see the final posts).
    https://discussions.apple.com/message/7818914?messageID=7818914#7818914?messageI D=7818914
    Replace dashes, underscores, hyphens & any other funky looking characters. Very long filenames of folder paths may cause trouble too.

  • What does this message mean? : "The file name "DSC_0088.jpg" is offline or missing." ?

    What does this message mean? : "The file name "DSC_0088.jpg" is offline or missing."   I am in the process of importing photos from iPhoto (don't really know what I'm doing....) and when I look at one of the imported photos that message pops up.  I know what "DSC_0088.jpg" is.  I don't know what it means that the file is "missing".

    CASpyr,
    Thank you so much for your reply.  I have a couple of bigger issues that I am dealing with: too many photos on my laptop: 40,000! (Of course I have to throw away many of them, but that is time consuming). I have a MacBook Pro and have primarily used IPhoto. I have recently purchased 2 external drives and have transferred my photos to those, but I need a basic education about how photos are stored, copied, etc.  I have recently been told that iPhoto only shows and deals with jpegs, not RAW.  About 1/3 of my photos are RAW, so I purchased Lightroom, so I could do more with those RAW photos.  I have been told by my local Mac store that I need to delete most of my photos from iPhoto, because it's causing problems.  I am reluctant to do so until I am sure that all of the keywords, descriptions and editing I have done to these photos is not lost when deleted from iPhoto. I just watched a tutorial about importing to Lightroom and got out of it that I needed to copy photos from iPhoto to a file on my desktop and then copy to Lightroom.  I did that, it seemed to work.  Then (because of my storage/memory issues) I deleted the photos (just a few as an experiment) from that desktop file.  I'm guessing that is why Lightroom doesn't recognize the the photos.  It seems that (learned from another tutorial) that one uses "Add" , Lightroom is only connecting to the source of the photo, not  actually copying it to the program.  Sounds like I need to use the "Move" feature instead.  My ultimate goal is to store the photos on the 2 external drives and eliminate most of them from my lapop.  So my basic questions have to do with what data (metadata??) is copied from iPhoto to an external drive (RAW???) and what isn't copied. Basic understanding issues,obviously….  I hope this isn't too much to ask.  If you can recommend a book or resource that can explain those basic issues to me I'd appreciate it.  I just got back from a trip and I can't download my new photos until I manage the rest!
    Thanks,
    Nancy

  • What does this message mean - The operation can't be completed because the item "12b" is in use.

    The operation can’t be completed because the item “12b” is in use.  What does this message mean.  It appeared as I was attempting to clear my time machine backup?

    Reboot your machine make sure Aperture doesn't start (as Lion is liable to do) and try it.

Maybe you are looking for

  • IPod Touch Cannot Sync with iTunes

    I just got back my iPod touch from an apple store, after i had a previous problem with it restoring but they fixed that problem. Now, when i try to sync my iPod with my itunes library i get tons of different error messages and it doesn't work. Someti

  • Create a new directory in server with JSP

    Hi, How can I create a directory in server with JSP. File dir = new File("a"); dir.mkdir(); does not work. what do I do? best regards,

  • 1st gen Ipad updates

    My wife has the 1st gen Ipad and most of the apps today will not install because it need to update the software, but when updating it says its up to date with 5.1. Why will it not update? Thank You

  • QDL3  QM

    Hello Gurus, Can anyone tell me the link between material and dynamic modification rule in QM and abt creating a quality level in QDL1 t code Helpfull answers will be rewarded Thanks Suresh

  • Creating multiproviders using infosets

    Hi All, I want to create a report which should fetch data from 2 infosets.So i thought of creating a multiprovider using the 2 infosets. Please provide some information regarding how to create multiprovider using 2 infosets.