public class StringEqual   {  public static void main(String[] args)    {   String str1 = "abcd";   String str2 = "abcdefg";   String str3 = str1 + "efg";   System.out.println("str2 = " + str2);   System.out.println("str3 = " + str3);   if (str2 == str3)   {      System.out.println("The strings are equal");   }   else   {      System.out.println("The strings are not equal");   }    }   }   so far i've created this code. Now i am trying to figure out how do i make it so that str2 and str3 are equal when they are compared?
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?
I'm making a door with piston sliding sideways that reacts to pressure plates. As the pressure plates are sending the current to redstone at a very low level, I need to raise it somehow, and this leads to awkward stairs of redstone.    So I'm wondering whether there are better ways of sending the redstone current up, maybe even vertically. Duplicate user in reputation league So I understand that this has happened in the past: , but all of the &quot;duplicate&quot; posts are marked as  so here is a new bug report: On the , I am listed twice:  While that's fun and all, it isn't exactly right. So I was in my New Leaf house and I accidentally put on a pair of pants instead of displaying them. Then I went and clicked on myself and I have no option to take off my pants. Ever. I swapped them with another pair for the display, but I can't get those off either. And the weird bit is when I put on the pants nothing was swapped back to my inventory.  How do I take off my pants? Down vote changed to up vote caused reputation meter to pass daily maximum Making a Laser in Cycles - Straight Beam of Light? Will running a large query on a secondary database in an availability group affect transaction performance in the primary database? I need to provide real-time, or almost real-time, data for SSRS and Tableau reporting. I don't want the production OLTP system to be negatively impacted by long running queries. Will running a large query on a secondary database in an availability group affect transaction performance in the primary database? Package pgfplots Error: CRITICAL: shader=interp: got unsupported pdf shading type '0' For the set of data , the following code can't compile showing the error     Package pgfplots Error: CRITICAL: shader=interp: got unsupported pdf   shading type '0'. This may corrupt your pdf!.   \documentclass[border= 5mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document}     \begin{tikzpicture}     \begin{axis}[unbounded coords=jump, view={70}{40}]     \addplot3 [surf,shader=interp]      table [x index={0}, y index={1}, col sep=tab] {mySurfaceData.txt};     \end{axis}     \end{tikzpicture} \end{document}    So, what went wrong to cause this?  P.S. the original data without NaN is available , where I would like to skip plotting those points of z=1. Modifying list while iterating With the last update of Fallout Shelter, Bethesda has added these "limited time" quests.  Question is, how limited is that time exactly? What happens when the quests "end", will it still be possible to get the benefits? What's the best way of replacing a plug or switch in a house with aluminum wiring? How do I completely reset network settings? Dynamic Object Intellisense force long text inside \item[{\texttt{}] to wrap $|f'(x)| \le g(x)$ implies $|f(b) - f(a)| \le \int_a^b g(x) dx$, without assuming $f'$ to be integrable. extending convergence radius using one boundary point Show that if $f(z)=\sum\limits_{n\geq0}a_nz^n$ is analytic in $\{z\in\mathbb{C}:|z|&lt;1\}\cup\{1\}$ and $\forall n\geq0:a_n\geq0$ then the radius of convergence of the power series is strictly larger than $1$.  My approach:   Let $D=\{z\in\mathbb{C}:|z|\leq1\}$.  We have that $f(1)$ converges, so $\sum\limits_{n\geq 0} a_n&lt;\infty$. Moreover since the $a_n$'s are all positive we have that $|a_n|=a_n$, therefore $\sum\limits_{n\geq 0} |a_n|=\sum\limits_{n\geq 0} a_n&lt;\infty$.  Let $f_n(z)=a_nz^n$, then $\forall z\in D, n\geq 0$ we have:  $$|f_n(z)|=|a_nz^n|=|a_n|\cdot|z^n|=a_n\cdot |z|^n\leq a_n\cdot 1^n\leq a_n$$  Then, applying Weierstrass M-test we get that the power series is convergent in $D$.  Now, I need to "find" an open ball $B$ such that $D\subset B$ and the power series is convergent in it.  Edit  $f$ is analytic in $1$, so there is an open set $U$ that contains $1$ such that   $$f(z)=\sum\limits_{n\geq 0} b_n(z-1)^n$$  Does it mean that the series is convergent in $U$?   I can see that we have that the two series coincide in $D\cap U$. Can I get a postdoc in China more than 3 years after having received my PhD? How to split larger files into smaller parts? The differences between TeX engines I am confused about what TeX and its offspring (LaTeX, pdfTeX/pdfLaTeX, e-TeX, ConTeXt, LuaTeX, etc.) are.  Some, like LaTeX, seem like add ons to TeX (maybe a change to the eyes and mouth, but not stomach). Others, like pdfTeX, seem like changes to the underlying system (i.e., a change to the stomach).  Is there a good reference that explains the differences and the evolution? In my preamble, you'll find:  \renewcommand{\baselinestretch}{1} \renewcommand{\familydefault}{\sfdefault} \usepackage[sfmath]{kpfonts} \usepackage[mathrmOrig]{sfmath} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{animate} \usepackage{anysize} \usepackage{arcs} \usepackage{array} \usepackage[scale=0]{background} \usepackage{blindtext} \usepackage{calc} \usepackage{cancel} \usepackage{chngcntr} \usepackage{CJK} \usepackage{CJKspace} \usepackage{CJKpunct} \usepackage{colortbl} \usepackage{enumitem} \usepackage{epstopdf} \usepackage{etoolbox} \usepackage{fancybox} \usepackage{fancyhdr} \usepackage{float} \usepackage{framed} \usepackage{graphicx} \usepackage{hyphenat} \usepackage{ifthen} \usepackage{latexsym} \usepackage{lmodern} \usepackage{multicol} \usepackage{multirow} \usepackage{mwe} \usepackage{pgffor} \usepackage{rotating} \usepackage{tabularx} \usepackage{textcomp} \usepackage{tgheros,tgtermes,tgcursor} \usepackage{tikz} \usepackage{times} \usepackage{tipa} \usepackage{varwidth} \usepackage{wasysym} \usepackage{wboiboites} \usepackage[abs]{overpic} \usepackage[breaklinks,colorlinks=true,linkcolor=red,citecolor=red, urlcolor=blue]{hyperref} \usepackage[framemethod=TikZ]{mdframed} \usepackage[breakable, theorems, skins]{tcolorbox,empheq} \usepackage[default]{gillius} \usepackage[document]{ragged2e} \usepackage[latin1]{inputenc} \usepackage[spanish]{babel} \usepackage[T1]{fontenc} \usepackage[total={18.59cm,26.5cm},left=1.5cm,top=2.5cm]{geometry} \usetikzlibrary{matrix,arrows, positioning,shadows,shadings,backgrounds,calc, shapes, tikzmark} \usetikzlibrary{shadows.blur} \usetikzlibrary{shapes.symbols} \usetikzlibrary{patterns,fadings} \tcbuselibrary{skins,breakable,listings,theorems}    I'm trying to draw an arrow for X axis and Y axis.   \begin{tikzpicture} \draw[yellow!10, fill=blue!5](-1, -1) rectangle (7, 5); \draw[dotted] (-0.75,-0.75) grid (6.75,4.75); \node[below] at (-0.25,0){$O$}; \draw[-&gt;,black, thick] (-0.75,0)--(6.75,0); \end{tikzpicture}   But I get this error:    Additionally, if I remove -> from the options of \draw the tikz picture compiles normally. After the upgrade I can't figure out how the new shield system works. I have the option to discard the shield, and I notice I have a new potion in the inventory.  More importantly, I got attacked (and lost) twice in a short amount of time and don't have a shield. When do you now get shield?