I just started learning JAVA. I am writing a very simple program  to print something on based of command line argument. but it is not working as expected.   Here is my program and output.      It should print "e" but it is printing "n".    please tell me where I am doing wrong.
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?
How to convert an MKV to AVI with minimal loss To convert an MKV to AVI, I do two things. The first thing I do is this:  ffmpeg -i filename.mkv -vcodec copy -acodec copy output.avi   or this:  ffmpeg -i filename.mkv -sameq -acodec copy output.avi   Either of these will convert the MKV to an AVI, but the problem is that the video does not play smoothly for some reason. That's fine though, because if I do one more thing it gets fixed:  ffmpeg -i output.avi -vcodec mpeg4 -b 4000k -acodec mp2 -ab 320k converted.avi   After I do this then the file plays without problem. I had success doing it this way for one file, but then I tried it on another file, and there is a slight, but noticeable loss in video quality. This is the output I get when doing the second step:  FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers   built on Dec 29 2010 18:02:10 with gcc 4.2.1 (Apple Inc. build 5664)   configuration:    libavutil     50.15. 1 / 50.15. 1   libavcodec    52.72. 2 / 52.72. 2   libavformat   52.64. 2 / 52.64. 2   libavdevice   52. 2. 0 / 52. 2. 0   libswscale     0.11. 0 /  0.11. 0  Seems stream 0 codec frame rate differs from container frame rate: 359.00 (359/1) -&gt; 29.92 (359/12) Input #0, avi, from 'output.avi':   Metadata:     ISFT            : Lavf52.64.2   Duration: 00:04:17.21, start: 0.000000, bitrate: 3074 kb/s     Stream #0.0: Video: mpeg4, yuv420p, 704x480 [PAR 229:189 DAR 5038:2835], 29.92 fps, 29.92 tbr, 29.92 tbn, 359 tbc     Stream #0.1: Audio: vorbis, 48000 Hz, stereo, s16 Output #0, avi, to 'converted.avi':   Metadata:     ISFT            : Lavf52.64.2     Stream #0.0: Video: mpeg4, yuv420p, 704x480 [PAR 229:189 DAR 5038:2835], q=2-31, 4000 kb/s, 29.92 tbn, 29.92 tbc     Stream #0.1: Audio: mp2, 48000 Hz, stereo, s16, 320 kb/s Stream mapping:   Stream #0.0 -&gt; #0.0   Stream #0.1 -&gt; #0.1   I just used arbitrarily large settings on the second step and it worked nicely before but not in this case. What settings should I use? using nginx with SNI By now I've not used SNI with nginx yet. But as IP address pools are quite filled and commercial XP support is about to cease (finally) I'm thinking about converting a few sites to SNI.  I'm aware of the general limitations and pitfalls that might come along with SNI (XP issue, very old browsers). But beyond that is there anything I should be aware of?   Like - nginx related pitfalls when using SNI - issues/bugs with recent (notable!) browsers Why do we need Diffie Hellman? Diffie–Hellman offers secure key exchange only if sides are authenticated. For authentication, sides are using public/private key. So if side A knows the public key of the side B, then A can simply use that key to encrypt the message (or the new session key).  Why bother to use separate key exchange algorithm? I'm able to get a list of the field types with the following code.  $defs = \Drupal::service('plugin.manager.field.field_type')-&gt;getDefinitions();   I want to get the field type of a specific field. How do I get it?  For example, I'd like to check if the field type of field_image is _image. Is there code similar to the following one?  $fieldType = \Drupal::service('plugin.manager.field.field_type')-&gt;getDefinition('field_image'); Clearly this is an edge case and I probably shouldn't have even tried awarding the bounty to a deleted answer, but why is the bounty award button even available?  It's not a bug since someone added in the notification seen in the final image.  But that sure seems like a roundabout way to let the user know that they can't award a bounty to a deleted answer.  The second step is particularly strange since the system really ought to know that the warning is pointless: no bounty can be awarded.  My suggestion is to rip-off the  and let bounties be awarded without the warning.  Then remove the single click button from deleted answers. Is there a way to disable the hardware on/off switch for the Wireless interface? Do questions about specific StackOverflow implementation details belong on SO or Meta? has several discussion comments going back and forth about whether the question belongs on SO or Meta.  The question is asking about how a specific feature of the site is implemented from a coding perspective (so that the OP might duplicate it in their own implementation), which can make it a legitimate programming question.  According to the Meta FAQ: "If your "question is about ... Stack Overflow / The core Stack Exchange engine", it should be asked here.  Here are some similar example questions on Meta:         Where do these questions belong? What is the proper way to explain the twin paradox? I was drinking iced-water from a drinking glass (made of glass) at a restaurant yesterday when I was taking a drink, I noticed that there is very little ice water coming out and then suddenly, the ice water mixture comes crashing down. With my open mouth overfilled with ice water, my shirt gets wet – I hate when this happens. After drying myself off, I started thinking why this does happen:   How does ice that starts off loose and separated in water fuse together to form one large clump? What causes the ice-water mixture to stop flowing momentarily and then suddenly starting flowing again? Is it that the ice fuses together in the glass and forms one large clump, and then the friction with the edges builds a "dam-like" situation? Or are there individual pieces of ice fusing with the edges of the drinking glass damming-up the ice? How to exclude jars generated by maven war plugin? $A$ is normal and nilpotent, show $A=0$ Given a matrix $A \in R^{n \times n}$ which is normal ($AA^H=A^HA$ where $A^H$ is hermitian of $A$) and nilpotent ($A^k=0$ for some $k$). Now we need to show that $A=0$. (This is essentially exercise 5(b) in sec. 80 on p.162 of Paul R. Halmos' Finite-Dimensional Vector Spaces.) I tried to show in the following way, we know that, $AA^H=A^HA$ pre-multiply by $A^{k-1}\implies A^kA^H=A^{k-1}A^HA$ Now, we have $0 = A^{k-1}A^HA$, since $A$ nilpotent. I am not sure how to proceed from here to show $A=0$. Can someone help me in this problem? Accessing an array out of bounds gives no error, why? Why does the Community User reject / approve edits? Wacom Graphics Tablet CTH-480 / CTL-480 Not Detected In Ubuntu 13.10 My Wacom tablet (CTH-480) is not detected by the Wacom Tablet option under settings. The Tablet shows up when I run lsusb but does not show up under settings. Again Thanks. Force LaTeX image to appear in the section in which it's declared Possible Duplicates:           How can I force an image in a LaTeX documents to appear in the section in which I declared it?  I don't want that an image about "Section A" to appear in "Section F". :(  I actually include an image with  \begin{figure}[ht] \begin{center} \includegraphics[scale=0.7]{./img/RobotManipulator3D_WorkSpace.png} \end{center} \caption{3D View of the robotic workspace (in red).} \label{Img:3DRobotWorkspace} \end{figure} Styling multi-line conditions in 'if' statements? I have a bit of a unique problem. Well, maybe not a problem because I'm really just curious about it, but...  I have a simple 8 digit calculator. It has +, -, x, /, and a constant operation function. It has no usable memory slot.  I need (lit. would like to know how) to calculate ln(x) on this calculator. Any series I have found lose a lot of precision since whatever is outside the 8 digit range is truncated without rounding. I have used Padé approximants with trig functions, and a continued fraction for exp(), but none of these two methods are adequate for ln(x), either because there is no way around the truncation error or it requires writing down many intermediate values, or it requires memorizing and punching in many constants.  Does anyone know any good way to calculate ln(x) (or any other base, since memorizing one constant is OK) to as many digits as possible as easily as possible on this calculator (bonus points to methods where the value on the screen is immediately, meaning you don't need to write it down)?  For that matter, if you happen to know some good ways to calculate other special functions, I am interested in that as well.  Thanks! Is this defined by the language? Is there a defined maximum? Is it different in different browsers? "In" vs. "after" for future talk sudo -k vs. sudo -K I know what the man page has to say about the -K and -k :     ‑K       The ‑K (sure kill) option is like ‑k except that it removes the user's   cached credentials entirely and may not be used in conjunction with a   command or other option. This option does not require a password. Not   all security policies support credential caching.      ‑k[command]       When used alone, the ‑k (kill) option to sudo invalidates the user's   cached credentials. The next time sudo is run a password will be   required. This option does not require a password and was added to   allow a user to revoke sudo permissions from a .logout file. Not all   security policies support credential caching. When used in conjunction   with a command or an option that may require a password, the ‑k option   will cause sudo to ignore the user's cached credentials. As a result,   sudo will prompt for a password (if one is required by the security   policy) and will not update the user's cached credentials.   So if there is no need to use a command in conjunction with these options, am i correct in assuming K is always the better option to use rather that k?