ArrayList&lt;String&gt; nameList = new ArrayList&lt;String&gt;();     nameList.add("James");     nameList.add("Joe");     nameList.add("Josh");     nameList.add("Bob");     nameList.add("Billy");     System.out.println("The names are:\n " + nameList);      nameList.remove(1);     System.out.println("Find the index 1 and remove their name from the list:\n "+ nameList);      nameList.size();     System.out.println("Currently the ArrayList holds " + nameList.size() +                         " names after removing the name of index 1" );      String[] tempArray= new String[nameList.size()];     tempArray = nameList.toArray(tempArray);      System.out.println(tempArray); // I want it to display the values of the ArrayList      }    }   The output I'm getting is [Ljava.lang.String;@4554617c when I want it to look like this [James, Josh, Bob, Billy]. New to programming would appreciate the help.
In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]
How can I get another application's installation path programmatically? I would like to know if there is any man page documenting the construction of the most basic script commands like if/then/else, while, for each, and all the relative switches, like -eq, -e, -ge, and so on. SEO in Stack Overflow We've been out of private beta for only two days, and stackoverflow.com is already ranking high in .  Are there any specific techniques applied in the site? I've been researching the subject for some time and haven't found it to be so easy.   even returns site-links.  () Every Window in Windows 8 got this icon if it gots the focus. When clicking on it, nothing seems to happen.   How does this icon work? Is $\bar X$ a minimum variance unbiased estimator of $\theta$ in an exponential distribution? I proceeded by finding $\operatorname E(\bar X).$ I considered $\bar X$ as a constant and simply got the term itself. This should suggest that $\bar X$ is not an unbiased estimator of $\theta$. That's obvious too cuz it's a constant(from what I assumed). However, I'm also aware that $\mu = \theta$ so that's probably not right.  I have to demonstrate first that $\bar X$ is an unbiased estimator of $\mu$. In a standing wave, how does energy travel past a node?  It should just get reflected. Assume the case of first overtone and you strike the string at a place. How will energy distribute itself?  If it distributes over the whole string, then how is it the wave traveled past a node?  Basically the problem is a standing wave has been set up in the string . Now you strike the string at a place, and this creates a new pulse. Now this pulse will travel past the next node in the string (not the boundary) or will it reflect off even that node and remain confined to a particular region of the string? SOQL result ordering in the absence of an Order By clause In the absence of an  in a SOQL query, what order will Salesforce return results in?  Clearly if ordering is important then Order By should be specified, but I recently encountered a question about what the order would be if it was undefined.  My initial thoughts were Salesforce would return them in whatever order suited them. Much like .  For simple queries this would typically line up with the creation date descending and the Id ascending. For more complex queries it would depend on the joins being performed. Is there a way for me to download the full list of tags (and synonyms) used on Stack Overflow? My intent is to import these tags into an SQLite database as part of a process to convert all of my delicious bookmarks and tags to the ones used here on Stack Overflow. Prove existence of a real root. Two mice heterozygote and black are reproduced. Find the probability of getting the filium dark and heterozygote Identify the plane defined by $|z-2i| = 2|z+3|$ I tried:  $$|z-2i| = 2|z+3| \Leftrightarrow \\ |x+yi-2i|=2|x+yi+2|\Leftrightarrow \\ \sqrt{x^2+(y-2)^2}=\sqrt{4((x+2)^2+y^2)} \Leftrightarrow \\ \sqrt{x^2+y^2-4y+4} = \sqrt{4x^2+24x+36+4y^2} \Leftrightarrow \\ x^2+y^2-4y+4 = 4x^2+24x+36+4y^2 \Leftrightarrow \\ y^2-4y-4y^2=4x^2+24x+36+x^2 \Leftrightarrow \\ -3y^2-4y=5x^2+24x+26 \Leftrightarrow \\ ???$$  What do I do next? Why does the humidifier make a stove's flame orange? Just like , the color of my stove's flames were affected by the humidifier as well.  Why does this happen? Is it a good thing or a bad thing ? At the end of Billions, Season 3, Episode 9, Grigor Andolov (John Malkovich) tells a story to Bobby Axelrod (Damian Lewis) about the Christmas market in Moscow. He asks a question about what happened to a boy:  Andolov: Many years ago, I was walking along the Moskva Christmas market. You ever seen Moskva Christmas market? Always a sense of good cheer, even during the lean years. I think it was the wine. They serve warm wine with the spices in it... cinnamon and... I was waiting on the line — everyone was always waiting on the line — and finally I got my cup, I turn, and there was this little boy. Runny nose. He looking at me so desirous of my cup of this warm, warm wine that I give him a sip. He stares at me with such a gratitude. And then I notice his mother. Plump breasts. She must have known someone. So I give him my cup of wine. And I take his mother away from the square. Behind the soldiers. And after, I leave her for the soldiers. And I walked back, and this little boy is staring at me with his greedy drunken eyes. Do you know what happened to him? Axelrod: No. Andolov: I always ask. No one ever knows.  What is the real meaning of this story? And how is it connected to the Axelrod – Andolov relationship? How can I disable my internet connection from terminal? What documentation does a Mexican citizen need to fly domestically within Mexico? If a Mexican citizen, residing in Mexico, wants to fly domestically, what documents are needed?   Example: Flying from Torreon to Cancun (different states in Mexico) PHPExcel Sumif and Skip One word for things that would be nice to have, but not required to have? A singularity, by the definition I know, is a point in space with infinite of a property such as density.  Density is Mass/Volume.  Since the volume of a singularity is 0, then the density will thus become infinite because Mass/0 = undefined  However, is it possible to have a singularity with a mass of 0? 0/0 is indeterminate, but would it be possible for a singularity to exist even if its mass and volume were zero? Automating the scanning of graphics files for corruption Does anyone know of a way to check graphics files (particularly JPEG, GIF, and PNG) for corruption (preferably in an automated way)?    Explanation:  A few days ago, a command worked incorrectly and ended up deleting thousands of graphics files from a FAT32 volume that was practically out of space. I’ve used several different file/photo-recovery programs, but naturally, they are limited in how much they can recover (though fortunately the volume has 8KB clusters, which helps somewhat).  Anyway, some of the larger files, that were fragmented, are now corrupt. Some of them are not even real files at all (the recovery software merely dumped the clusters that were pointed to by now-overwritten directory entries), while others are broken because of fragmentation.  Moreover, because some picture formats embed a smaller version of the picture as a thumbnail, scanning the thumbnails for corruption is not reliable because it may be intact while the actual file (i.e., the picture when viewed full-size), could be corrupt.    Here are a couple of examples:      Here’s the second one. It’s so damaged that it doesn’t display anything.    (A third one wouldn’t even upload because it doesn’t even have the correct header!) Google translate exclude words