I am trying to get my code to keep repeating asking if I want to end my code while "input" is y, but whenever I press y to continue it ends. I am not sure what I am doing wrong here. Is  my logic off?  import java.util.*;  public class InputValidation {    public static void main(String []args) {       String input = "y";       while (input == "y") {          Scanner console = new Scanner(System.in);          System.out.print("Press \"y\" to continue, anything else to end ");          input = console.next();       }    } }
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?
Can I complete the Pokedex with only 6th Generation games? How can I get rid of this black hole in my minecraft world? I have interesting bug that I have experienced before but has gone away on its own. This one is not going away though.  I have a giant stripe or chunks missing from my desert biome, I would say probably 7 chunks long.  I'm guessing the chunks are corrupted or something, what was hoping to figure is whether it can repaired or reverted.  Here is a picture of the problem. How can a file be copied? Isomorphism between quotient modules Is it true for a commutative ring $R$ and its ideals $I$ and $J$ that if the quotient $R$-modules $R/I$ and $R/J$ are isomorphic then $I=J$? Is is possible to move all windows (or all not minimized windows) form one workspace to another?   I know I can move one window to other workspace with Shift+Ctrl+Alt+arrow, but it will move only that one focused window. Gilbert, MacWilliams, and Sloane defined a solution to "perfect integrity" in , unconditionally secure message authentication, not vulnerable to any cryptanalysis on its own even by an adversary with unbounded computational power, provided you have a key chosen uniformly at random the same length as the message. It sounds counter-intuitive that a MAC could have perfect integrity, any hash function can be broken with enough computational power. How does their solution have "perfect integrity"? I've always wondered about this and never found a good solution.  But  reminded me of it.  When I have a URL on my website it can be displayed and accessed any of the following ways:  http://www.somesite.com/subdirectory http://www.somesite.com/subdirectory/ http://www.somesite.com/subdirectory/index.htm http://www.somesite.com/subdirectory/index.html http://www.somesite.com/subdirectory/index.php http://www.somesite.com/subdirectory/index.asp http://www.somesite.com/subdirectory/some-relevant-keywords http://www.somesite.com/subdirectory/some-relevant-keywords.htm http://www.somesite.com/subdirectory/index.php?page=some-relevant-keywords http://www.somesite.com/subdirectory/?page=some-relevant-keywords http://www.somesite.com/subdirectory/?page=some-relevant-keywords&amp;even=more-keywords   etc...   Now, I can understand the merits of adding keywords in the URL. Even the most basic SEO guide will mention to do just that. ... but for the sake of sanity, clarity, ease of reading, ease of use, and so on, including web compliance ...  Is it preferred to have a file-extension or not?  Really, deep down my logic tells me: yes, it should. The reason being is this stems back to the days of the past when the internet was mostly USENET, FIDONET, FTP and GOPHER.   See, if a URL has no filename, then it normally is considered a directory. This is where index.htm came about, because this by default lists the directory if no index file is found. However, soon enough, web programmers started overriding this and using index.htm to actually serve the content of that web directory as a page. The main difference, was markup language was added in, and this was parsed in the browser. With this markup language, the Content-Type:text/html; tag in the response header became the indicator to what filetype it was for any file. HTML seems to be the only "filetype" that just doesn't have consistently named extensions, except for when they are saved.  Unfortunately, once web pages became the main thing, it became a security error to actually display the directory contents, so everything stayed hidden with only the actual URL content being displayed.   Not to mention the cross-platform file-naming wars.. windows based require a 3 or less digit extension, and unix/mac can have more. So should it be .HTM or .HTML or NONE and let the platform decide?  So in essence, I guess what I am trying to figure out is beyond SEO and dealing more with aesthetics and web compliance. How to rename multiple files sequentially from command line? How to rename file as below  AS1100801000002.RAW7AGS  AS1100801001008.RAW7AH4 AS1100801002001.RAW7AH9 AS1100801003002.RAW7AHE AS1100801004009.RAW7AHT AS1100801005002.RAW7AHY AS1100801010002.RAW7AJ3   to new name  AS1.txt AS2.txt AS3.txt AS4.txt AS5.txt AS6.txt AS7.txt I'm working on a fairly big document that has a lot of graphs of functions- so far it has around 200, by the end it will have around 1500. I use pgfplots for each graphic, and the functions are pretty basic: exponential, rational, polynomial, and trigonometric.  Once I am happy with each graph, I don't necessarily need to see it every time I compile, and would like to minimize compilation time for future drafts. Naturally, the document is already chopped up into chapter files, but each chapter contains around 100 figures.  Having studied the pgfplots documentation, I haven't found a draft mode, but I'm interested in knowing if one could be created.    I'm envisaging something similar to the draft mode of the graphicx package, in which graphics are not included, and blank boxes are put in their place.  Some things I've considered:   the  documentclass; but with about 1500 figures, wouldn't this mean over-modulization?  tikzexternalize, but this still requires an initial 'monster' compilation to get the images externalized before the draft option could be invoked   Here's a MWE to play with  \documentclass{article} \usepackage{pgfplots}  \begin{document}  \begin{tikzpicture}     \begin{axis}         \addplot {x^2};     \end{axis} \end{tikzpicture}  \end{document} Bring a window to the front in WPF Is my US visa still valid after change in name? I'm a Malawian national and I got US Visa years back.  Recently, due to some reasons, I had to get my first name partially changed on my passport. I have got an affidavit certificate stating the reason and proof.  Since the visa on my old passport has still not expired, but there is a difference in first name, will I face any problem? Integral $\int_{1}^{2011} \frac{\sqrt{x}}{\sqrt{2012 - x} + \sqrt{x}}dx$ Evaluate:  $$\int_{1}^{2011} \frac{\sqrt{x}}{\sqrt{2012 - x} + \sqrt{x}}dx$$  Using real methods only.  I am not sure what to do.  I tried finding a power series, which was too ugly.  I just need some hints, not an answer to do this integral, this is from the MIT Integration bee 2012. Idiom/Phrase for "results without work/effort" I'd be greatly appreciative of a cleverly devised idiom/phrase that depicts the following concept:     Results without work/effort.   ...and/or...     My Work/Effort; Your Result.   Any idioms/phrases you can recount or conceive would be of use.    Contextual Edit:  The idiom/phrase should be in the context of service offering/hiring or task delegation, not free-loading as most answers thus far have understandably assumed. E.g.     [You hire me for] My Work/Effort; [My work/effort produces] Your   Result. How to copy only file attributes (metadata) without actual content of the file? How to create a Geometric Polygonal Art portrait I've been interested in creating Geometric Polygonal art illustrations, i.e. making polygons and shapes with different color shading represent a face, or an object, see  set of .  How are they achieved? Is there some script for Illustrator which alters the image adding the shapes according to the colors or shades? How would I transform a normal image of Marilyn Monroe for example, to a polygonal illustration of her? Is it possible to recover an email that has been clicked "delete forever" in the trash folder? Differences Between Row Echelon and Reduced Row Echelon Let $$A =\begin{bmatrix} 1&amp;3&amp;-6&amp;2\\5&amp;12&amp;-24&amp;7\\9&amp;15&amp;-30&amp;6\end{bmatrix}$$  $$RREF(A) =\begin{bmatrix} 1&amp;0&amp;0&amp;-1\\0&amp;1&amp;-2&amp;-1\\0&amp;0&amp;0&amp;0\end{bmatrix}$$ $$REF(A) =\begin{bmatrix} 1&amp;3&amp;-6&amp;2\\0&amp;1&amp;-2&amp;1\\0&amp;0&amp;0&amp;0\\\end{bmatrix}$$  Now, provided this information, it can be found that the basis for the nullspace of $A$ using the $RREF(A)$ is: $$\begin{pmatrix} \begin{bmatrix} 0\\2\\1\\0 \end{bmatrix}, \begin{bmatrix} 1\\-1\\0\\1 \end{bmatrix}\end{pmatrix}$$  Using the $REF(A)$ the "basis" for the nullspace is:  $$\begin{pmatrix} \begin{bmatrix} 6\\2\\1\\0 \end{bmatrix}, \begin{bmatrix} -2\\-1\\0\\1 \end{bmatrix}\end{pmatrix}$$  Is the "basis" that I provided for the $REF(A)$ actually a basis? How does the  $REF$ and $RREF$ of a matrix differ? Is there a way to give promo/coupon codes for people to download your app for free? Integrating $\int^0_\pi \frac{x \sin x}{1+\cos^2 x}$ Global and local variables in R