Not understanding why the memory location is being printed when I run. When I satisfy the 'if' statement I have in my code, the message I get back is "Your total is [I@5f184fc6". I would appreciate if someone could help get this issue resolved as well as explaining to me to help me understand and not run into this issue again.   import java.util.Arrays; import java.util.Scanner; public class steakShop {    public static void main(String [] args){     Scanner scanner = new Scanner(System.in);     String items[] = {"burger", "pizza", "shrimp", "nachos","stir fry"};          enter code here`int selection[] = {5,10,8,7,9};              for (String it: items) {                 System.out.println("Would you like to order a " + it + "?");                String itemSelected = scanner.nextLine();                   if (itemSelected.equals("yes"))                    System.out.println("Your total is " + selection + ".");   }  } }  Thanks for all comments and answers!
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]
Generate dynamic XY coordinate labels for dataframe corners in ArcGIS layout I need to label the four corners of a dataframe as shown in the image. Can this be done with dynamic text scripts? If n is such that every element $(\mathbb{Z}/n\mathbb{Z})^{\times}$ is a root of $x^2-1$. Prove that $n$ divides 24. I have a hard time formulating proofs.  For this problem, I  can see that if $n$ is equal to $8,$ this statement is true.  $(\mathbb{Z}/8\mathbb{Z})^{\times}$ includes elements:  $1,3,5,7$, and all of these are roots of $1-x^2 \pmod 8.$  And obviously $8$ divides $24.$  But how do I prove this without depending on number calculations and only using theorems?  Help Please?  I need a step by step walk through of how to do this proof and what theorems would be appropriate to use. XP Activation and Dual Booting Is there any short way to save the pipe output to the same file that it's processed. For example, this is what I am actually doing  $ cat filename | sort | uniq &gt; result $ rm -f filename $ mv result filename   I was wondering if there was a way to do it in just one line (not appending those commands using &amp;&amp;)  This is not the way, but to get an idea  $ cat filename | sort | uniq &gt; filename I am a British national living in Spain and my passport is either lost or stolen. I noticed this two days ago when I was intending to take a trip to Salzburg. As it happens, I managed to travel using my UK Driver's Licence. I think a severe mistake was made, as was pointed out to me in Austria, but as they were Schengen Countries, apparently all that is needed is a proof of identity, not a 'travel document'.  My question, therefore, is this. I have business trips over the next three weeks taking me from Spain to Germany, Czech Republic, Austria, and Italy, then back to Germany, and then to the UK. If I obtain an Emergency Passport from the Consulate here in Barcelona, would this be valid as an identity document within Schengen, before I eventually 'cash it in', so to speak, as a travel document when I make my trip from Germany to the UK?  I am hoping so, as I don't fancy my chances of getting back to the UK in time to secure an appointment for a fast-track passport. I am going to call the consulate tomorrow, but would appreciate any advice or prior experience. There is a type and search drodown which will appear after user type in the value. I need to click on the dropdown which contains the name of the drop down field.   The problem here is that there is no unique attribute present (No unique class, no unique name) &amp; the id keeps on changing after every login so cannot take id also. Solving a Linear Diophantine Equation A Linear Diophantine Equation is of the following form:                                                                                        $Ax+By+C=0$, where $x_1 \leq x \leq x_2$ and $y_1 \leq y \leq y_2$.  If the value of $A,B,C,x_1,x_2,y_1,y_2$ are given and $x_1 \leq x_2$ and $y_1 \leq y_2$, then how many solutions can be found? How can I find out the total number of solutions according to the above condition. Use integral test to show that Gaussian Integral $\int_{-\infty}^{\infty} e^{-x^2} \ dx$ converges? There's a question in my book (it's a school-specific textbook) saying:  Use the integral test to show $$\int_{-\infty}^{\infty} e^{-x^2} \ dx$$ (the Gaussian Integral) converges.  The integral test says if the integral converges, so does the series. But I have no idea how to represent this as a series, do I need to?   I'm not looking to evaluate it - I've read about it online - but how do I use the integral test here?  Thanks Show that if $n>2$, then $(n!)^2>n^n$. Show that if $n&gt;2$, then $(n!)^2&gt;n^n$.     My work: I tried to apply induction. So, at the induction step, I need to prove, $n^n&gt;(n+1)^{n-1}$ Here, I tried to use induction again without any luck. I also took log of both sides, but I did not get anything. Please help! I was having trouble playing the game on my android so I downloaded it to my wife's phone (Galaxy S6). I read some posts on how to get it running on my android and it worked but, my level 7 account is on my wife's phone.  How do I get it back to my android? When I sign out and back in it doesn't ask for any sign in info. I've tried deleting the app's data and even uninstalling and re-installing, but it still doesn't ask for sign-in info. Why are extra dimensions necessary? Some theories have more than 4 dimensions of spacetime. But we only observe 4 spacetime dimensions in the real world, cf. e.g.  Phys.SE post.   Why are the theories (e.g. string theory) that require more dimensions taken seriously by scientists?  Is there any proof that these extra dimensions exist? Is there a simple layman's explanation for the need [or strong hint] for extra dimensions? How do I check to see if a text file is empty or does not exist in c++? Is Force lightning from the feet plausible? In all the canons of Star Wars, there has not been one instance of a Force-user projecting Force lightning from their feet. Why? Is it implausible? How to encrypt files using a cross-platform solution? Since the latest versions (ICS+?) no longer have mass storage, is there any viable alternative to MTP?  The protocol seems inherently broken and the decision to regress to this format seems like a very 'iphone-esque' move (dumb things down, take away power from the users).  There seem to be numerous problems  with files not showing and it seems to me that transferring a file should be simpler than requiring a system reboot - I am unreasonably demanding that way.  I'm aware of tools like Wi-Fi file transfer but often I find myself in areas without wifi, with just my laptop, phone and a usb cable. The other day, for example, I was one a plane, which is an environment decidedly non-conducive to using a wireless system. Why are ammeters used in series and voltmeters in parallel? Why can't ARIMA model large lags and/or long range dependence? ARIMA cannot model large lags (obtained from autocorrelation plot) and long range dependency (hurst exponent $H &gt; 0.5$). Why is it so? I'm wondering if there's a simple way to rewrite this in terms of $k$ and $x$, especially as a polynomial. It seems to me to crop up every so often, especially for $k=2$, when I integrate with trig substitution. But $k=2$ is not so bad, because I can use the double angle formula; it's the prospect of higher values of $k$ that motivates this question.   I think the law of sines may help? Or maybe even De Moivre's theorem, to find the length of the hypotenuse as the length of the angle changes, if we think of the right triangle drawn from $\arcsin(x)$ with side1 = $x$, hypotenuse = $1$, and side2 = $\sqrt{1 - x^2}$ as a complex number, though I'm not sure how that might work. Finding places to play Magic the Gathering games A friend of mine recently got MTG for the XBox and is talking us into getting real cards.  I'm all up for starting but I dread the idea of playing the same two people over and over with no change epically since one of them is over competitive and exploits every loophole he can to win.  Does anyone know of any a reliable (not just google it) way to find places where people play MTG? When testing the difference between 2 proportions why do we use a z-test rather than a t-test?    Further, is there a simple way to conduct an omnibus test for significant differences between more than 2 proportions (in the form of percentages). Is there an equivalent to a one-way ANOVA for this?  I imagine that you could use logistic regression (assuming you have the original data for the proportions in the form of 0s and 1s) Are there other options?