String quit="N";         int i=0;         ArrayList&lt;String&gt; course = new ArrayList&lt;String&gt; ();         Scanner scan = new Scanner(System.in);         while (quit!="y")         {             System.out.println("Enter the Course code or y to exit:");             quit=scan.next();             System.out.println(quit);         };         System.out.println("out");   }   Im trying to quit the loop if the input is "y", but however the while loop continues execution over and over even after the input is "y", please help.
I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?
Is it time to be rid of automatic down votes on certain closed questions? Right now,  carry automatic downvotes.  The  for this was largely to enforce specific quality bans in part because people were not down voting questions. Now that question down votes are free on questions and it seems to be pretty commonplace for question quality bans to trigger, even without the automatic votes from closure, and we have completely revamped the closure system. Is it time to reevaluate whether or not these automatic votes are still a good idea?  What benefits do the automatic votes provide and have they effectively run their course? On SO, when I'm scrolling through "questions" some have a yellow background.  Is this intuitive to everyone but me?  What is the yellow background trying to tell me about this particular question? Is $\mathbb{R}^\omega$ endowed with the box topology completely normal (or hereditarily normal)? How to prove $x^{n}$ is not uniformly continuous How to prove $x^{n}$ is not uniformly continuous on the interval $[0, +\infty)$? This question led to a new package:      I'm trying to make some good-looking numbers in a circle, using the simple command:  \textcircled{1}   However, the circle is misaligned vertically with the number, and look a bit sloppy:    Any suggestions how can I adjust the vertical alignment so that the numbers look more centered w.r.t to the circles? Or, if that's not an option, what other ways to achieve the same results are possible?  I will use those only for numbers, and in very few places, so manual adjustment per glyph is an option.  I'm using pdfLaTeX with Computer Modern, if that matters. Clicking community promotion ad renders an instance of SO within the frame of that ad Today I came across an ad on this question on SO:  (I don't expect it to stay very long).   There was a community promotion ad on the right hand side of the site, I think for one of our English sites. It had a sentence that I only partially remember:     Idiom ... poor or even poorer   I found it interesting, so I clicked that ad. Which caused a new instance of SO to open within the ad space. Unfortunately I failed to take a screenshot. I've been refreshing the page like crazy, but can't get the ad to appear again.  Edit: I managed to get a new community add, for the photography site, and captured a screenshot:   Edit2: This bug still persists, I saw it today with an OOP add from CodeReview, and an area 51 add. Layers with different directional drop shadows in Photoshop I am wondering how to have 2 different directional drop shadows in the one file with Photoshop. e.g. 2 different type layers — one has a drop shadow at 90 degrees, the other at -45 degrees.  Currently it seems Photoshop only lets me have 1 universal direction for the whole file, which I find really pointless.   I know how to apply different drop shadows and merge down layers to achieve the same thing, but its tedious and not exactly streamlined for making future changes to that layer.  How is this achieved? maximize volume of triangle in given perimeter I have a question about the pattern "turn &lt;something&gt; on &lt;somebody&gt;" :     Then he allegedly turned the body-building equipment on his 44 year-old wife, identified by sources as Feng Liang, and his elderly mother-in-law, Feng Kun Zaehng,77, the sources said.     I understand the phrase "*turn the gun on &lt;somebody&gt;", am not sure about "turn the equipment on &lt;somebody&gt;".  Could the example be wrong? "NG NS" on ticket after airport security Is a noisy laptop fan caused by dirt on the fan? Solutions of bivariate cubic Diophantine equation The problem is what are the integer solutions to  $$7x^2 - 40xy + 7y^2 = (|(x - y)| + 2)^3$$  I only got $x - y = 4 (\mod 13)$. Also, how to solve it? The selection toggle arrows in the Outliner disappeared. Is there some preference in the settings that has to be turned on? What is Hawking radiation and how does it cause a black hole to evaporate? My understanding is that  isn't really radiated from a black hole, but rather occurs when a particle anti-particle pair spontaneously pop into existence, and before they can annihilate each other, the antiparticle gets sucked into the black hole while the particle escapes. In this way it appears that matter has escaped the black hole because it has lost some mass and that amount of mass is now zipping away from it.  Is this correct? If so, wouldn't it be equally likely that the particle be trapped in the black hole and the antiparticle go zipping away, appearing as if the black hole is spontaneously growing and emitting antimatter?  How is it that this process can become unbalanced and cause a black hole to eventually emerge from its event horizon and evaporate into cosmic soup over eons? I hope this isn't a duplicate.  Similar questions that I found are over a year old.  I have seen cases where shortly after an upvote (perhaps on an old answer?), the summary in my user activity dropdown shows inconsistent counts:    Particularly, the Slid a div offscreen using jQuery answer shows +40, when it was only updated once yesterday.  Now, if this is a monthly total for this question, then it is correct, but when I refreshed later I got:    Now it shows +10, and other entries completely disappear.  So, what is this supposed to show me?  At the very least I am confused about what I am supposed to see here.  Here is another example:    This shows +20 for the same question as before, after I received a single upvote last night.  What gives?  You can see from my reputation that there was only a sinle upvote recently: Can I control voltage of USB data pins? Can I bind a (large) block of addresses to an interface? I know that the ip tool lets you bind multiple addresses to an interface (eg, ). Right now, though, I'm trying to build something on top of IPv6, and it would be really useful to have an entire block of addresses (say, a /64) available, so that programs could pick any address from the range and bind to that. Needless to say, attaching every IP from this range to an interface would take a while.  Does Linux support binding a whole block of addresses to an interface? I haven't been able to do this exercise:     Let $f: A \rightarrow B$ be any function. $f^{-1}(X)$ is the inverse   image of $X$. Demonstrate that if $f$ is surjective then $X = f(f^{-1}(X))$ where $X \subseteq B$.   Since $X \subseteq B$, all the elements in $X$ belong to the codomain of $f$.  Since $f$ is surjective, it means that all elements in the codomain $B$ have some preimage in $A$. Given that $X \subseteq B$, all elements in $X$ must also have a preimage in $A$.  Have $\triangle = f^{-1}(X)$, $\triangle$ is now a set containing the preimages of the elements in $X$. Because of this, $\triangle \subseteq A$.  If we evaluate $f(\triangle)$, we...... nope, I don't know what I'm doing now.    What do you think? Implement multiple inheritance in Javascript Validate date format in php