Here is my method....     void getMerchandise(String category){          for(int i=0; i&lt;merchandise.size(); i++){              if(merchandise.get(i).getCategory()== category)                  System.out.println("\n"+merchandise.get(i).toString()+ "\n");          }   Okay, now if I call the method using...    park1.getMerchandise("Hats");   It works just fine and prints all the items with Hats as the category.  However if I do....       String z= input.next();      park1.getMerchandise(z);   and then I type in the word Hats, it gives me nothing.  I have another method in which I do the exact same thing, and it works fine.  I have the scanner imported, and the scanner is static and is called input.  So there are no errors there.
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?
What are the guidelines for using version-specific tags? I believe that some of my questions were asked before but I didn't find any satisfying guidance. I just found only . I hope senior members will help me to understand the situation and use tags correctly.  I have several questions which are related to following explanation:   What is current community's attitude towards version specific tags on Stack Exchange?  How to correctly use version specific tags?  When is it good to create version specific tag? Should any version specific tags be at least marked as synonyms to version unspecific tags? Should I use version specific tags if I re-tagging questions?  Should I re-tag questions if I think that incorrect version specific tag is used?   For example, I mainly visiting questions related to two main topics: WCF and Entity framework. Tagging questions in these topics follow very different rules. WCF uses single main tag  sometimes combined with  currently proposed as synonym to WCF, whereas Entity framework currently have:      - version 2 and 3 never existed  - I started this tag myself but now I think it was a mistake   and two ridiculous tags (both for CTP5 of EF 4.1 – their meaningful lifetime was about 3 months):         I've already several times retagged questions introducing tag for EF 4.1 RC. Separate problem is in Code-first approach related strictly to  where 5 other tags are used to describe the same:           I asked for merging these tags in .  As you can see that EF topic currently contains too many tags to describe the same. There are other related tags to EF but they are mainly used as supporting tags for specific features.  First I thought this is a common situation because ASP.NET MVC uses also new tag for each version even questions usually asks for general problems related to any version but then I was informed by @Richard in  that EF is probably tag polluted.  I regularly retag questions in EF topic. Currently I'm using:     as general topic's tag because I was already informed by @Slauma  that people usually have only this tag between their favorites and I should not remove it. It was a good point.   for questions related directly to EFv4 features  for questions related directly to EF 4.1 features  for questions related to fluent and annotations mapping from EF 4.1   But still I think that  and  are somehow redundant but I'm not sure if my opinion is shared by other participants in these tags. WCF also has 3 versions and almost twice as more questions than EF and it still uses only single main tag  without any problem. I think the used version should be information included in a question.  Are there any general rules? What about version related tags to C#, .NET and ASP.NET MVC? I first thought that it is common and accepted approach to create version specific tags just because users around ASP.NET MVC (strong tag) do the same.  Sometimes I think I received privileges too early and I don't use them correctly. I need some guidance. Modifying Score text in Locate Widget of Flexviewer 2.4? I want to add text where it says "score" to make it more clear that this is an address matching score.    I am using the LocateWidget_US.xml and do not think I can do it here.  I think the place to do it may be in the LocateWidget.mxml in this line????   locateResult.content = getDefaultString("resultScoreText") + " " +   (addrCandidate.score % 1 == 0 ? addrCandidate.score : addrCandidate.score.toFixed(1)); Determining best fitting curve fitting function out of linear, exponential, and logarithmic functions Context:  From a question on Mathematics Stack Exchange , someone has a set of $x-y$ points, and wants to fit a curve to it, linear, exponential or logarithmic.  The usual method is to start by choosing one of these (which specifies the model), and then do the statistical calculations.  But what is really wanted is to find the 'best' curve out of linear, exponential or logarithmic.  Ostensibly, one could try all three, and choose the best fitted curve of the three according to the best correlation coefficient.  But somehow I'm feeling this is not quite kosher. The generally accepted method is to pick your model first, one of those three (or some other link function), then from the data calculate the coefficients. And post facto picking the best of all is cherry picking. But to me whether you're determining a function or coefficients from the data it is still the same thing, your procedure is discovering the best...thing (let's say that which function  is -also- another coefficient o be discovered).  Questions:   Is it appropriate to choose the best fitting model out of linear, exponential, and logarithmic models, based on a comparison of fit statistics? If so, what is the most appropriate way to do this? If regression helps find parameters (coefficients) in a function, why can't there be a discrete parameter to choose which of three curve families the best would come from? Why do I get "Required key not available" when install 3rd party kernel modules or after a kernel upgrade? This issue happens only on UEFI systems with enabled Secure Boot.  When I try to install DKMS modules like VirtualBox, Nvidia, or Broadcom drivers, they do not install and I get Required key not available when I try to modprobe them.  VirtualBox complains that vboxdrv is not loaded.  Broadcom wl driver is shown in lspci -k as a kernel module but is not in use. sudo modprobe wl throws Required key not available.  Also this issue may happen when I install some kernel modules from git sources.  This issue may appear after a kernel update as disabled wireless adapter, black screen after a reboot, etc.   How can I fix it? Electric circuits in TeX, LaTeX, and Friends What are some ways to draw electric circuits in TeX systems?  I'm making this community wiki since I haven't found a question related to this.  I was thinking along the lines of . What do you think of that? Other examples are more than welcome, of course. Get Absolute Position of element within the window in wpf I would like to get the absolute position of an element in relation to the window/root element when it is double clicked. The element's relative position within it's parent is all I can seem to get to, and what I'm trying to get to is the point relative to the window.  I've seen solutions of how to get a the point of an element on the screen, but not in the window. Do extension fields always belong to a bigger field? Let $F$ be a field, $E_1$ and $E_2$ are two distinct extension fields of $F$. Is it the case that we can always somehow find a field $G$ that contains both $E_1$ and $E_2$? In other words, could extensions of fields have different 'direction's such that they are incompatible?  Edit: I began to think about this problem while reading a proof. $F$ is a field. $a$ and $b$ are algebraic over $F$. $p(x)$ and $q(x)$ are two polynomials in $F[x]$ of minimum degree that respectively make $a$ and $b$ a zero. The proof claims that there is an extension $K$ of $F$ such that all distinct zeros of $p(x)$ and $q(x)$ lie in $K$. For a single polynomial, I know this kind of field exists because of the existence of splitting field, why it is true for two polynomials? Opposite of caregiver I want to write a book about the unfair expectations of a caregiver. A caregiver refers to somebody to looks after somebody else.  What is the term for that 'somebody else'.  'Patient' doesn't seem all encompassing. Error when using TikZ-Feynman package Given that $xyz=1$, prove that $\frac{x}{1+x^4}+\frac{y}{1+y^4}+\frac{z}{1+z^4}\le \frac{3}{2}$ How can I know what speed card to get for my camera? I have looked for similar questions here on stack exchange. The closest example to this that I found is . That question assumed less than perfect absorption of material lining the inside of the sphere, and the effect of thermally re-radiating it inside the sphere.  A lot of the answers focused on that much of the thermal radiation would not be reflected back to the star, and is likely to be reabsorbed by the sphere at another location. On the other hand, this question asks what would happen if the Dyson sphere, using mirrors, deliberately refocus a significant portion of the rays directly back at the star. When transfering data using TLS the browser and server agree the cipher suite to be used - so for example this could be chosen as AES-128 and is (probably) outside of my control. If I separately encrypt a file using AES-256 and then Alice downloads this via her browser (using AES 128) have I still effectively got AES-256 security?  My reasoning goes like this: even if the AES-128 encryption on the TLS link was broken by Eve then all she would get is the AES-256 encrypted file and she would then have to break that encryption to see the plaintext.  Of course the AES-256 key is sent to Alice over a separate channel. How do I make the player name show up on a /tellraw command? So I am currently making a minecraft custom map (for 1.9). I want to make the player "say" something using /tellraw commands. I did figure out how to make the player name come up using /say commands, but still have no idea how to do it using the /tellraw command.  How do I do that? This is the first part of the first half of the a proof in the Axiom of Choice. The proof that the Axiom of Choice is equivalent to the choice function. REsources: Keith Devlin's Joy of Sets: pg. 58. F.R. Drake and Singh Intermediate Set Theory: pg. 110).   I am confused on proving disjointness and will ask further questions of proof once I get this first part v. clear for myself.   AC1: Let $\mathcal F$ be a family of pairwise disjoint, non-empty sets. Then there is a set $\mathcal M$ that consists of precised one element from each member of $\mathcal F$  AC2: For every family $\mathcal F$ of non-empty sets, there is a choice function $\mathcal f$. (I.e. $\mathcal f(X)$ is a member of X, for each X in $\mathcal F$.   Disjointness: Two sets are disjoin if Q $\cap$ R = $\emptyset$. Meaning that they have zero elements in common. These sets do not overlap.   Show: AC1 $\leftrightarrow$ AC2   (1) ($\rightarrow$) Let $\mathcal F$ be a set of nonempty sets.   (2)For each X $\in$ $\mathcal F$, let $X^*$ = (X $\times$ {X}) = {(x, X) | x $\in$ X})  (3) Show Disjointness.  An outline of how book proves  disjointness:  (a) if u = {(X $\times$ {X}) | x $\in$ X} then u is of the form $\lt  z, t \gt$ where z = X and t=x, i.e. x $\in$ X.   (b) then if u $\in$ ({X} $\times$ x) $\cap$ ({Y} $\times$ Y) $\rightarrow$ u = $\lt z, t \gt$ with z = X and z=Y, i.e. X=Y. Which means ({X} $\times$ x) = ({Y} $\times$ y).  Questions: (1) Apparently we cannot prove disjointness in $\mathcal F$ but must prove in a different set. If so, why is that?  (2) why is the case that if u $\in$ ({X} $\times$ X) $\cap$ ({Y} $\times$ Y) then z =X and z=Y? I am not following that step at all.   (3) why does the axiom of choice have to do with ordered pairs? Why are we setting X $\in$ $\mathcal F$, let $X^*$ = (X $\times$ {X})?    Thank you! In-universe explanation for single line of planetary entry/departure in Star Wars Why are planetary blockades confined to a single point of a planet instead of being sphere shell shaped around the planet? (I know, it would take an awful lot of spaceships.)  Also, when a rebel ship wants to escape from a planet and there is a single star destroyer hovering in the atmosphere (or some more of them further up, like in the Empire Strikes Back) how come it's not a viable maneuver to fly low altitude for a couple of hundred kilometers horizontally (they would be out of the single-point blockade), then make a vertical dash upwards? How to reduce the size of VMware disk My Ubuntu image VMware disk has grown to 5GB physical file size. It's a dynamically growing disk with the maximum capacity of 8GB. I cleaned some stuff inside Linux distro and now inside it occupies 3GB. Obviously the physical file size didn't shrink back automatically. Is there a way (if possible free of charge) to shrink this disk back to ~3GB?  I need this to fit the image on the DVD. Total MU Calculation when Outer CF is linked to Inner CF What happens to the Y MU from the outer field when 2 fields are connected AFTER both fields are made. What would be the total MU gained in the checkpoint in the third step? What is crop factor and how does it relate to focal length? Custom fields not useable in Approve/Reject Approval Request I'm trying to get through my first SalesForce mod and it's definitely been a rocky path. I have one task I'm trying to do, but this section is holding me back.  I have two custom fields.  One a pick list and the other a text box. I have added them to the Approve/Reject Approval Request section in the Opportunity page. I added the fields through the Select Fields to Display on Approval Page Layout and they DO show up on the Approve/Reject Approval Request section. I added them in like ().  However, just the label for the fields show, the field itself is nowhere to be found and can't be used.    You can see and even use the fields when you open the Opportunity page itself, but when you go to use the Approve/Reject, you can't do anything with them or see any values.  I was never a SalesForce user and got this tossed in my lap and really don't know my way around yet. I appreciate any help on this!!  Thanks!!  Kurt