Please, consider the following code:  public static void main(String[] args) {     String value="abc";     value="";     if(value==""){         System.out.println("blank "+value);     } }   I do not understand why if(value=="") is returning as false.
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?
It's become clear that last night's (Tues Jan 8th 2019) patches to Windows 7 broke SMB2 networking in Lanman Server.  One or both of KB 4480970 and KB 4480960 results in any OS that uses SMB2 (such as Windows XP, some Windows 7, and same generation server OS' and Mac OS X machines (certainly 10.10, 10.11 not sure about others yet)) being unable to connect to Windows 7 Pro shares.  Client machines repeatedly prompt for login despite credentials being correct. Display Custom Fields in a SharePoint 2010 Content Query Web Part Using SharePoint 2010, Having Custom List With 4 Columns, Now I am Using Content Query Web-part To Display List Data ,But Currently It Display Only First Column, SO How to Display Custom Fields in a SharePoint 2010 Content By Query Web Part Calling the base constructor in C# If I inherit from a base class and want to pass something from the constructor of the inherited class to the constructor of the base class, how do I do that?  For example, if I inherit from the Exception class I want to do something like this:  class MyExceptionClass : Exception {      public MyExceptionClass(string message, string extraInfo)      {          //This is where it's all falling apart          base(message);      } }   Basically what I want is to be able to pass the string message to the base Exception class. Show that $\lim\limits_{a \to 0^+} \int^1_0 ax^{a−1}f(x)dx=f(0)$. Suppose $f$ is Riemann integrable on $[0,1]$ and continuous at 0. Show that $$\lim\limits_{a \to 0^+} \int^1_0 ax^{a−1}f(x)dx=f(0).$$   Can anyone share some insight on this one? I have no idea where to begin. Maybe a substitution? Reviewed suggested edit view for title-only edits takes body of last revision? Yesterday I was pointed at some rejected suggested edits. Some of the corrections were valid, so I edited the posts accordingly, while making several further edits. Looking at the suggested edits now however, it seems that for those posts where only changes to the title were originally suggested, the post mortem suggested edit view now incorporates the body of the latest revision. (Or at least it appears like that to me)  Take for example . If you take a look at  of that post, you will see my later edits. The edited body seems to have been incorporated in the suggested edit view. For edits where originally changes to the body were suggested, there is no such confusion.   Why does this matter? In the case of some post mortem discussions or explanations it might help to see the actual situation as it was when the edit was suggested. Especially in the case of edits that might be considered too minor.   So have I stumbled upon a bug here? Find all Quotient (or Factor) Groups of $D_4$ (Dihedral Group of order $8$) I need to be able to find all of the quotient groups for dihedral group 4 with $D_4 = \{ e,R,R^2,R^3,V,H,D,D'\}$. I know I have to start by finding the normal subgroups, which are $\{e,R^2\}$ $\{e,R,R^2,R^3\}$ $\{e,R^2,V,H\}$ $\{e,R^2,D,D'\}$. Then I need to find the sets defined by $G/H=\{ aH : a \in G\}$ with operation $aH  bH = abH$. I am stuck here; could someone please show me how to find all of the factor groups for D4? Gray cone obscuring/clipping the 3D Viewport Let $A$ and $B$ be two $n \times n$ symmetric and positive definite matrices.   If $A \prec B$, then is it true that $B^{-1} \prec A^{-1}$?  Here, $A \prec B$ means that $B-A$ is positive definite. I'm seeing red dots everywhere On all Stack Exchange sites where I have review privileges, the review queue menu icon has a red dot. No matter what I try, it doesn't go away.     on Meta Stack Overflow might or might not be related. What to do when you find a bad link in an answer? If a link has gone stale in an answer, what is the correct way to report this in the SO universe?  e.g. Jon's first link in    I have added a comment but not found the correct link yet. StackExchange drop down hiding chat, blog and log out, concerns Factorial of $i$ With $i^2=-1$, what is $i!$ ?  I'm not sure if it is $i$ or if it is an infinite product $i(i-1)(i-2)(i-3)(i-4)(i-5)\dots$  It would make sense either way.  Is it not defined? Reusable functions in jQuery callback If you draw two cards, what is the probability that the second card is a queen? We had this question arise in class today and I still don't understand the answer given. We were to assume that drawing cards are independent events. We were asked what the probability that the second card drawn is a queen if we take two from the deck. The answer given was 4/52, which seems counter-intuitive to me. How is the probability still 4/52 if there was a card drawn before it? What if the first card drawn was a queen? Display only the penultimate (second last) row of a text Prison problem: locking or unlocking every $n$th door for $ n=1,2,3,...$ I have a problem called "The Prison Problem" that I need to explain to my 9-year-old cousin. I would think that he has just started learning about divisors and perfect squares, and as such, I have a proposed solution. Any input from you guys would be welcome, as to what is the best way to go about this.  Problem:  There was a jail with 100 cells in it, all in a long row. The warden was feeling very jolly one night and told his assistant that he wanted to give all the prisoners a wonderful surprise. While they were sleeping, he wanted the assistant to unlock all the cells. This should be done, he told the assistant, by putting the key in each lock, turning it once. The assistant did this, then came back to report that the job was done. Meanwhile, however, the warden has second thoughts. "Maybe I shouldn't let all the prisoners free," he said. "Go back and leave the first cell open, but lock the second one (by putting the key in and turning it once). Then leave the third open, but lock the fourth, and continue in this way for the entire row." The assistant wasn't very surprised at this request as the warden often changed his mind. After finishing this task, the assistant returned, and again the warden had other thoughts. "Here's what I really want you to do," he said. "Go back down the row. Leave the first two cells as they are, and put your key in the third cell and turn it once. Then leave the fourth and fifth cells and turn the key in the sixth. Continue down the row this way." The assistant again did as instructed. Fortunately, the prisoners were still asleep. As a matter of fact, the assistant was getting pretty sleepy, but there was no chance for rest yet. The warden changed his mind again, and the assistant had to go back again and turn the lock in the fourth cell and in every fourth cell down the row. This continued all through the night, next turning the lock in every fifth cell, and then in every sixth, and on and on, until on the last trip, the assistant just had to turn the key in the hundredth cell. When the prisoners finally woke up, which ones could walk out of their cells?  Proposed solution:  Ten cells are left open after this process. Every cell that is a perfect square will remain open (1, 4, 9, 16, 25, 36, 49, 64, 81, and 100). If a number is not a perfect square, then it has an even number of divisors, therefore it will be "toggled" an even number of times and end up where it started (closed). Perfect squares have an odd number of divisors, so they will end up the opposite of where they started (open). Height/Radius ratio for maximum volume cylinder of given surface area How many ways can $b$ balls be distributed in $c$ containers with no more than $n$ balls in any given container? How do I print out the contents of a vector? Isn't the uncertainty principle just non-fundamental limitations in our current technology that could be removed in a more advanced civilization? From what I understand, the  states that there is a fundamental natural limit to how accurately we can measure velocity and momentum at the same time. It's not a limit on equipment but just a natural phenomenon.  However, isn't this just an observational limit? There is a definite velocity and momentum, we just don't know it. As in, we can only know so much about the universe, but the universe still has definite characteristics.  Considering this, how do a wide range of quantum mechanical phenomena work? For example, quantum tunneling - its based on the fact that the position of the object is indefinite. But the position is definite, we just don't know it definitely. Or the famous light slot experiment? The creation of more light slots due to uncertainty of the photon's positions?  What I am basically asking is why is a limit on the observer, affecting the phenomenon he is observing? Isn't that equivalent to saying  because we haven't seen Star X, it doesn't exist? It's limiting the definition of the universe to the limits of our observation!