.class and .length - where do they come from?

hi,
I was wondering about the field .length, which you can invoke on an array
int anIntArray[] = new int[10];
System.out.println("length="+anIntArray.length);
this would produce the output
length=10
But where does this field come from? I can not find it in the Object-class.
The same thing applies to the .class:
System.out.println("String's class="+String.class);
would produce the output
String's class=class java.lang.String
Where does the .class in String.class come from? And is it a field, an operator or something else?
Are there any other "hidden" fields or operators, which are not keywords or come from Object?

Arrays are objects so they can have fields. The length field defined in the classes for the arrays. These classes are created on the fly by the JVM so you won't be able to see the fields in any source code or JavaDoc documentation.
'.class' isn't a field at all. When you put '.class' on the end of a class name what you get is a class literal. Class literals evaluate to an instance of the Class class. Try compiling a small example using '.class' and then take a look at the produced java bytecode using 'javap -c'.

Similar Messages

  • I receive numerous messages in "Bulk Mail". Where do they come from and how can I prevent them from being received? Thanks

    I receive numerous messages in "Bulk Mail". Where do they come from and how can I prevent them from being received? Thanks

    Once you're on a spammer's list, there's nothing you can do to stop the flood of e-mail messages. You can either control it, using spam filtering (which is what files those messages in the Junk Mail folder), or you can throw out your e-mail address and get a new one.
    It's sad, but spam is simply a fact of life at this point, and there's nothing to be done about it. Legislation has been tried, with zero success, since most spam either comes from countries with no legislation or from personal computers that have been infected with malware and are part of a "botnet."

  • What are stray points and where do they come from?

    Just curious.
    CS3
    XP2.
    I recently made a drawing incorporating some elements from Inventor (PDFd and placed). After finishing filling in the details, I drew a marquee around the entire drawing and noticed dimensions of the drawing where 10x what it should have been.  I zoomed out and and saw two pairs of points. one pair right, one left, were showing as selected. I tried selecting just the points and could not. After re-selecting only my drawing, they would show up.  Its like they were grouped but not.
    Anyway, going to select/ object/ stray points and deleting them solved it.
    What are they and where did they come from?  Obviously Illustrator recognizes they can be there because of the built-in menu allowance.

    Stray points can occur in a multitude of ways. They occur much more frequently in Illustrator than other drawing programs because of its basic selection interface.
    However, some programs' exports intentionally place stray points at opposite corners of the page bounds in order to convey those bounds to the importing program. (I often see this in imported DXFs.) That sounds like the kind of situation you are describing.
    JET

  • IPhoto 6 "found" old photos - where did they come from?

    When I opened iPhoto 6 for the first time, it updated my iPhoto library just fine. In the process a dialog opened saying it found 134 photos from somewhere, and asked if I wanted to import them. When I said YES, it created a new album and imported those 134 photos into it.
    The photos ended up being old photos (2-4 years old) that I thought I had deleted a long time ago, many of my ex-wife during holidays and a vacation 3 years ago! Where did they come from? Needless to say, my new fiancee wondered why I had old photos of the ex! I thiought they were gone.
    I used Spotlight to search for "IMG_0...) and found many old photos I had deleted! I do not have an old iPhoto libraray on my PowerBook G4, but the photos were still there in folders, deep inside iPhotos filing system. I deleted all the ones I needed to, all by hand within the Finder.
    What happened?

    I had well over 2,000 photos recovered... Also ranging from 5 years old to this past month.
    There was no clear answer but the photos were recovered in large chunks (300 from December, 400 from March, 600 from January, etc...)..
    The entire time I has iPhoto 5, it never worked properly (always crashed) so a lot of these photos clearly were photos not properly saved in iPhoto 5.
    However, I don't see them in my main library. How do I move them from recovered to the Library?

  • What are the authorities listed in the certificate manager and where did they come from?

    I am being blocked from some websites and cannnot figure out how. I am not a student nor am I trying to access sites from work. This is occurring at my home. While trying to fix things I stumbled upon the Authorities list in the Certificate Manager. What is this list for? And also, where did the items in the list come from?

    That are the build-in root certificates and intermediate certificates from servers that you have visited.
    See http://en.wikipedia.org/wiki/Root_certificate

  • Firefox Check Your Plugins found "unknown plug-ins". My other plug-ins are up to date. To keep Firefox running safely and smoothly can the "unknowns" be safely uninstalled? How do I know if I need them? Where do they come from?

    These are the Plug-ins in question;
    Yahoo! activeX Plug-in Bridge Unknown plugin Research
    Microsoft® DRM
    DRM Netscape Network Object Unknown plugin Research
    RealPlayer Version Plugin
    12.0.1.666 Unknown plugin Research
    RealPlayer(tm) HTML5VideoShim Plug-In (32-bit)
    RealPlayer(tm) HTML5VideoShim Plug-In Unknown plugin Research
    RealNetworks(tm) Chrome Background Extension Plug-In (32-bit)
    RealNetworks(tm) RealPlayer Chrome Background Extension Plug-In Unknown plugin Research
    RealJukebox NS Plugin
    RealJukebox Netscape Plugin
    I cannot say with certainty any plugins known or unknown installed on my computer are problematic. My other plugins are up to date. "Unresponsive Scripts" comes up quite often. No particular website, Grooveshark and Centurylink more than any others. Are the two (Plug-ins and Scripts) related?

    option discovered in preferences. Really this and any feature that moves deletes or edits a users data should as far as possible be OFF BY DEFAULT. It shouldn't by default and without the users specific say do this dangerous and unnecessary thing without even letting the user know what it's doing!!! And then cause me a few hours (as i'm new to mac) searching for the option so as to switch it off. If i hadn't noticed the status cage declaring that it was copying files then i might never have twigged that this insane thing was occurring. And if i hadn't of noticed i would have been left maintaining the contents of the folder i copied the files to, the folder which as far as i was informed and so believed was also the location of the music files i was playing. How does Apple justify this 'genius' piece of software non-design? Surely it will hurt no one if this was off by default for new users - overall at least i dare say it would cause a lot less distress in the future for the unsuspecting public at large. Thanks for the support.

  • IPS Signatures - Where do they come from and how are they enforced?

    Ok i have heard different stories on this. At first I heard Trend makes these and is the reason for the licensing in the past few years. Another internal source tells me that cisco has a signature creation group/committee internally that creates these. Whats the skinny? Also, when a know vulnerability is seen out on the internet and a CVE is associated with it, what is the delta in time before this "internal committee" decides to create them as a cisco sig? Can anyone indicate the policy cisco goes through on the decisions and how long this usually takes? Lastly, Cisco sends new sigs all the time, weekly nowadays. In those new sig sets are retired sigs. Why have retired sigs sent in a new sig set ? or are these sigs stricly retiring the old sigs already in the system ? How does cisco decide to retire a sig, what process dloes it go through?
    Ok there is a lot there but we have  alot of  students who ask and it may benefit a high nunber of cisco customers.....
    Thanks
    Jim

    For this box, I would recommend that you ask your question in the netpro forums.  These forums don't cover that box.
    www.cisco.com/go/netpro

  • XML publisher - the output have few vertical lines.where are they come from

    I need some suggestion on how to debug.
    just take over a project. The invoice is present using XML publisher. the template also called sub template for header and footer information. But there are vertical line between each column almost all the way from the header to the footer. I original though that must be the boarder from each column. but not really. I even delete all the column, or even the for-each@section... Still see the vertical liine. I won't see them at all in the template.
    Where are these vertical line comes from

    ATI Radeon HD 2600 XT:
    Chipset Model: ATI Radeon HD 2600
    Type: GPU
    Bus: PCIe
    Slot: Slot-1
    PCIe Lane Width: x16
    VRAM (Total): 256 MB
    Vendor: ATI (0x1002)
    Device ID: 0x9588
    Revision ID: 0x0000
    ROM Revision: 113-B1480A-252
    EFI Driver Version: 01.00.252
    Message was edited by: Mac Pro Man
    I have looked the mac inside an everything seems fine.
    Message was edited by: Mac Pro Man

  • Blue borders - Where did they come from?

    I have some big button links on my site that have developed
    blue borders. How did this happen and how can I get rid of them?
    Really screws with my color scheme. (Got some other issues, too,
    but this is the most aggravating).
    http://christchapelmaconga.org/sportstowne/ccsthome.html
    Thanks

    >>Almost everyone disables the default border around
    image
    As do I. I responded to what I perceived as a knee-jerk
    disdain to default
    behavior. Best to know why things are the way they are before
    changing them.
    You and I know why the border is there and can make an
    informed decision as
    you have. I don't thank that is true for the OP. Just my
    read.
    Walt
    "Michael Fesser" <[email protected]> wrote in message
    news:[email protected]..
    > .oO(Walt F. Schaefer)
    >
    >>If your response is serious I fear you have a rough
    and uncomfortable road
    >>ahead. If you would take the time to actually
    understand HTML you would
    >>discover default behaviors usually (always?) have a
    logical purpose. The
    >>blue outline you so hate is there to make navigating
    the site easier for
    >>the
    >>visitor. You seem to care nothing for the visitor
    only what you want. 10
    >>years ago you might have gotten away with that
    attitude. Today's Internet
    >>is
    >>user/visitor-oriented not designer-oriented. You
    really have to understand
    >>how things work and why before you start slashing
    usability to satisfy
    >>your
    >>own tastes.
    >
    > You have very valid points, but I think it was a little
    overreaction in
    > this case. Almost everyone disables the default border
    around image
    > links, including me. Remember how often this question
    comes up here.
    > And usually it doesn't cause any problems, because if
    done properly, it
    > should be already clear by the image itself that you can
    click it, for
    > example a button or a logo. You really don't need an
    additional border
    > there telling "hey look, I'm a link".
    >
    > Of course this doesn't apply to the link's outline (the
    dotted border),
    > which definitely is an important and required usability
    feature.
    >
    > Micha

  • Thousands of blank lines in code view? Where did they come from?

    I have an older DW site, that for some reason when I open certain pages in code view show literally thousands of blank lines.  So line 1, code, line 2-15 are blank, then what used to be line 2 of the code, is now line 16. All the way down the line.  This one page literally has THOUSANDS of blank lines in it:
    Aurora Prom Corsages, Boutonnieres, Flowers, School Dance Flowers-Yorkville, Osego Illinois
    page renders, edits and looks fine in DW, browsers, etc. 
    My client edits it with Contribute. I use DW.
    There are certain pages he opens regularly, never saw the lines, other pages, just opens once a year, lines all over again.
    We can't find any rhyme or reason to it.
    Has anyone ever seen this?

    Try opening one of those pages in DW and then go to Commands > Apply Source Formatting and see if that cleans them out.
    I've heard of a bug where adding html comments can cause added blank lines in certain versions, I've never seen it myself though.

  • Where did they come from?

    I have booted my Mac Pro up this morning to find there are tiny black lines and dots underneath the cursor arrow.
    The rest of my screen is perfectly fine. Is this a GPU or Logic Board problem?

    ATI Radeon HD 2600 XT:
    Chipset Model: ATI Radeon HD 2600
    Type: GPU
    Bus: PCIe
    Slot: Slot-1
    PCIe Lane Width: x16
    VRAM (Total): 256 MB
    Vendor: ATI (0x1002)
    Device ID: 0x9588
    Revision ID: 0x0000
    ROM Revision: 113-B1480A-252
    EFI Driver Version: 01.00.252
    Message was edited by: Mac Pro Man
    I have looked the mac inside an everything seems fine.
    Message was edited by: Mac Pro Man

  • BaseSystempkg folders?  Where did these come from?

    Hello everyone,
    This morning I formatted my hard drive and reinstalled Leopard from my DVD disc. After installing OS X I noticed three folders in my Macintosh folder, BaseSystempkg.146tc7TE9, BaseSystempkg.... I have reinstalled Leopard OS X before and have never noticed these folders. Where did they come from and should I be concerned?

    Those folders appear to have been left behind by the Mac OS X 10.5 installer, and can safely be deleted. They were supposed to have been cleaned up after the installation.
    (37068)

  • My welcome screen used to have just my name and an icon.  Now it has my name on one side and guest user on the other. where did it come from and how do I get rid of it?

    My welcome screen used to have just my name and an icon.  Now it has my name on one side and guest user on the other. where did it come from and how do I get rid of it?

    Either you enabled the guest user, or you enabled Find My Mac, which requires there to be an active guest account for a thief to log into, so that they'll connect to the internet and allow you to locate it.

  • Hi, I have a Power Book G4 Tiger 10.4.11 and my problem concerns iTunes 9.2.1(5). I have changed my Apple ID and password recently. Since that, I am told when I try to buy something in iTunes Store that my "session has expired". Where does this come from?

    Hi, I have a Power Book G4 Tiger 10.4.11 and my problem concerns iTunes 9.2.1(5). I have changed my Apple ID and password recently. Since that, I am told, only when I try to buy something in iTunes Store, that my "session has expired". Where does this come from? What should I do to solve this problem ? I would greatly appreciate your help. Thank you in advance.

    Hi, I am khonthaï. I solved the problem thanks to JHdeVilliers's post on 4 Dec. 2011: I removed all cookies in Safari and it worked immediately !!!

  • HT2486 I recently updated to Lion, when I accessed my address book I now have duplicates of cards that are in my contacts and groups. When I try to merge it says they come from different accounts. Any suggestions?

    I recently updated to Lion, some of my groups lost members and when I add them back in I get duplicate and even more of the same card. I am not allowed to merge the because the msg says they come from different accounts, any suggestions?

    You likely have them in both the On My Mac account and the iCloud account. I deleted all from my On My Mac account except the ones I didn't want iClouded. Did the opposite on the iCloud account.

Maybe you are looking for