I'm still newbie to java programming. And can anybody tell me what's wrong with the source code? When I run the code, the conditional assignment always outputs "login failed".  import java.util.Scanner; public class ProgramBiodataMahasiswa {     public static void main(String[] args) {         Scanner input = new Scanner(System.in);         String username, password, output;         System.out.print("Enter username     : ");         username = input.nextLine();         System.out.print("Enter password     : ");         password = input.nextLine();         output = (username=="kesit" &amp;&amp; password=="ps123") ? "login successfully" : "login failed" ;         System.out.println(output);     } }
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?
Using Integration By Parts results in 0 = 1 I've run into a strange situation while trying to apply Integration By Parts, and I can't seem to come up with an explanation.  I start with the following equation:  $$\int \frac{1}{f} \frac{df}{dx} dx$$  I let:  $$u = \frac{1}{f} \text{ and } dv = \frac{df}{dx} dx$$  Then I find:  $$du = -\frac{1}{f^2} \frac{df}{dx} dx \text{ and } v = f$$  I can then substitute into the usual IBP formula:  $$\int udv = uv - \int v du$$  $$\int \frac{1}{f} \frac{df}{dx} dx = \frac{1}{f} f - \int f \left(-\frac{1}{f^2} \frac{df}{dx}\right) dx$$  $$\int \frac{1}{f} \frac{df}{dx} dx = 1 + \int \frac{1}{f} \frac{df}{dx} dx$$  Then subtracting the integral from both sides, I've now shown that:  $$0 = 1$$  Obviously there must be a problem in my derivation here...  What wrong assumption have I made, or what error have I made?  I'm baffled. Implicit Differentiation Help I have to use implicit differentiation to find $\frac{dy}{dx}$ given:  $$x^2 \cos(y) + \sin(2y) = xy$$  I don't even know where to begin, I missed the class where we went over implicit differentiation, and because of that, I am completely stuck.   Thank you everyone.  Edit: I don't know how to make the equation look all nice and whatnot, so sorry about that If $T^n$ is $q$-contractive, $T$ exactly has one fixed point Consider a complete metric space $(X,d)$ and $T\colon X\to X$. Suppose there exists $n\in\mathbb{N}$ such that the n-th power of $T$ is $q$-contractive. Show that then $T$ has exactly one fixed point $\overline{x}\in X$.      The n-th power is defined inductively: $$ T^{n+1}(x):=T(T^{n}(x)), n\in\mathbb{N}. $$ And for a function $T\colon X\to X$, $q$-contractive means  $$ \exists 0\leq q&lt;1~\forall~x,y\in X: d(T(x),T(y))\leq q d(x,y). $$    Now to the proof.  I think I have to show, that $T$ is q-contractive, because then it follows with Banach, that $T$ does have exactly one fixed point. So I have to show, that there exists a $0\leq q&lt;1$ so that for all $x,y\in X$ it is $$ d(T(x),T(y))\leq q\cdot d(x,y). $$ And most likely I have to use the q-contractivity of $T^n$, i.e. that there exists a $0\leq q &lt;1$ so that for all $x,y\in X$ it is $$ d(T^n(x),T^n(y))\leq q\cdot d(x,y). $$  Can you help me? Elegantly determine if more than one boolean is "true" Are Windows file timestamps timezone aware? What happens to the energy when waves perfectly cancel each other? What happens to the energy when waves perfectly cancel each other (destructive interference)? It appears that the energy "disappear" but the law of conservation of energy states that it can't be destructed. My guess is that the kinetic energy is transformed into potential energy. Or maybe it depends on the context of the waves where do the energy goes? Can someone elaborate on that or correct me if I'm wrong? how do we know the BBP formula for $\pi$ is valid? I recently read about the Bailey–Borwein–Plouffe formula for calculating the $n^{\rm th}$ digit of $\pi$. I'm curious to how can we be sure that the formula is always accurate or correct?! Even if we can verify for every $\pi$ digit discovered till now with a "standard formula", how do we know that the formula is correct after those digits?  Also, what's the implication of these kind of BBP formulas for other "divine"/fundamental constants? can we learn anything else about the value of such constants and our universe through these? Any insight into the "supreme fascist" mind? Which way is up? (electric outlet) If votes works differently on meta sites how does that of accepting answers work? In the faq of meta sites you can read something like the following:     Voting here works a bit differently   from other Stack Exchange sites. On   Meta Stack Overflow, voting is used to   express agreement or disagreement, not   to point out a lack of quality or   helpfulness. Please don't be concerned   if you receive downvotes – members of   the community may simply disagree with   your bug, feature request, support   issue, or the nature of the   discussion.   My question is: If votes works differently on meta sites how does that of accepting answers work?  Take for instance a question on a meta site that is meant for the community to discuss some issue. What does it mean if the question is accepted? Accepting an answer is up to the author of the question so it cannot be a sign of what answer the community concludes from the discussion. It could mean that the discussion is over but that should be up to the community and not the author of the question. Is it so that accepting an answer for a discussion question on a meta site does not have a particular function? Should Stack Exchange introduce the ability to upload embedded sounds (maybe via HTML5/Flash, whichever the user has) as part of questions and answers to Stack Exchange?  It could require a certain amount of rep to stop new users from doing it frivolously.  My rationale behind this is the new language &amp; usage sites.  I often find myself thinking that it might be helpful, when discussing a regional dialect or something, for the person answering to just pronounce what they're trying to describe in words. How do I remove any Ubuntu brand and trademark from my Ubuntu install? How do I find out which process is eating up my bandwidth? I think I'm being the victim of a bug here. Sometimes while I'm working (I still don't know why), my network traffic goes up to 200 KB/s and stays that way, even tough I'm not doing anything internet-related.   This sometimes happens to me with the CPU usage. When it does, I just run a top command to find out which process is responsible and then kill it. Problem is: I have no way of knowing which process is responsible for my high network usage. Both the resource monitor and the top command only tell me my total network usage, neither of them tells me process specific network info.  I've found questions here about monitoring total bandwidth usage, but, as I mentioned, that's not what I need. Is there another command I can use to find out which process is getting out of hand?  The command iftop gives results that disagree entirely with the information reported by System Monitor. While the latter claims there's high network traffic, the former claims there's barely 1 KB/s.  I've already tried killing all the obvious ones (Firefox, update-manager, Pidgin, etc) with no luck. So far, restarting the machine is the only way I found of getting rid of the issue. Is 'acronymise/ze' a word? Is it used only colloquially, if at all? I just sent a text to a friend, who didn't understand an acronym I used for a game:      "Ah, I said it in a previous text so thought it was ok to abbreviate   it."   Though, since it was an acronym I had created, could I have used the word 'acronymise/ze' to be more specific?   I'm pretty sure it isn't a (formally used) word, but I wondered, as you often refer to acronyms specifically as acronyms, rather than abbreviations. Can you be more specific with a verb, too?  It sounds too odd to me, so I'm guessing generally no. But I wondered—so perhaps I'm wrong. Or half wrong. What is the difference between dpkg and aptitude/apt-get? When installing a software via dpkg -i packageA.deb, will the dependencies required by packageA be downloaded and installed automatically? How is this different from using apt-get or aptitude? If $f'$ is bounded, then $f$ is uniformly continuous Let $f\colon(a,b) \to \mathbb R$ be differentiable and suppose that there exists an $M&gt;0$ such that $|f&#39;(x)| \leq M$ for all $x$ in $(a,b)$. Prove that $f$  is uniformly continuous. Find all integral solutions of $y^2=x^3+7$ Find all integral solutions of $y^2 = x^3+7$.  I tried to use many different moduli, but it never works. With modulo $9$, you can get $x$ is divisible by $3$. Search and replace multiple values with multiple/different values in PHP5? A Hilbert space is, by definition, a complete inner product space. If $(V,|.|)$ is finite dimensional inner product space of dimension $n$ then it is (topologically) isomorphic to $\mathbb{R}^n$ which is of course complete. My instinct here is to say "and therefore, $V$ is also a Hilbert space". I'm not sure about this step however since completeness depends on the norm and the norm depends on the selected inner product (assuming the induced norm $||x|| = (x | x)^{1/2}$ is used). So, must we place some condition on the inner product or is the topological isomorphism between $\mathbb{R}^n$ enough to guarantee that V is Hilbert? The book Theory of Functions of a Real Variable by I. P. Natanson, proves that a denumerable or finite union of pairwise disjoint sets of cardinality $c$ has cardinality $c$.  The proofs given in the book are fairly easy, using the axiom of choice. But then it is left as an exercise a generalization of the above theorems for not necessarily pairwise disjoint sets.  I have searched all over the web, but all the proofs found so far are for pairwise disjoint sets.  The proof given in the book relies on the fact that each set $A_k$ can be matched with a set like $[a_{k-1},a_k)$, with $a_k$ point of a partition of $[0,1]$, such that $\bigcup_{k=1}^{\infty\lor n}A_k=[0,1)$. So it is easy to guess the bijective function, but I can't generalize this proof.  Any help is highly appreciated. Thanks and regards. If $A$ and $B$ are square matrices such that $AB = I$, where $I$ is the identity matrix, show that $BA = I$.    I do not understand anything more than the following.   Elementary row operations. Linear dependence. Row reduced forms and their relations with the original matrix.   If the entries of the matrix are not from a mathematical structure which supports commutativity, what can we say about this problem?  P.S.: Please avoid using the transpose and/or inverse of a matrix.