Write a program that accepts two numbers and a operator like (+,-,*, /) as command line arguments and perform the appropriate operation indicated by operator.If the user enters any other character the appropriate message will be displayed. The output of the program should be displayed to the user.  My Code is this  public class Practical4 {      public static void main(String[] args)     {         if(args.length==0)         {         System.out.println("No arguments are passed");         }         else         {          int a=Integer.parseInt(args[0]);         String p=args[1];         int b=Integer.parseInt(args[2]);          switch(p)         {             case "+":                 System.out.println("Addition of "+a+" and "+b+" : "+(a+b));                 break;              case "-":                 System.out.println("Subtraction of "+a+" and "+b+" : "+(a-b));                 break;              case "*":                 System.out.println("Multiplication of "+a+" and "+b+" : "+(a*b));                 break;              case "/":                 System.out.println("Division of "+a+" and "+b+" : "+(a/b));                 break;              case "%":                 System.out.println("Modulo of "+a+" and "+b+" : "+(a%b));                 break;               default:                 System.out.println("Please Enter '+', '-', '*', '/' &amp; '%' operator only.");         }         }      }  }   and i am getting this Error  java:17: incompatible types found   : java.lang.String required: int         switch(p)                ^ 1 error   Please Give the Solution. Thanks
Is this functionality going to be put into a later Java version?  Can someone explain why I can't do this, as in, the technical way Java's switch statement works?
Factoring Quadratics Is there a method to find which numbers to use when simplifying quadratics?   For example $x^2 + 5x + 6$ is easy enough to find, but what if I have bigger numbers, or I have this quadratic expression: $x^2 + 7x – 6$, then it gets very hard to think of a valid simplification.  EDIT: Here's an example: $(x^2 + 5x + 6)/(x + 2)$. When simplifying the first half we get $(x + 2)(x + 3)/(x + 2)$, then we can cancel out $(x + 2)$ and the answer would be $(x + 3)$. The question is: How to always find the right numbers which to put in? (in this example they where 2 and 3) creating a diagonal matrix with a variable amount of parameters How to determine whether a unique factorization domain is a principal ideal domain? Could someone please provide an example of a unique factorization domain that is not a principal ideal domain?  Furthermore, is there some way to determine whether a UFD is a PID? Is there a difference between the original file and a hard link to it? I'd like to synchronise some configuration files via a file hoster like Dropbox. I could create a hard link in the software's configuration folder and let it point to my cloud storage directory.  When having done that, is there a difference between those two files? I read somewhere that both files are attributes of the file in the master file table and that there would be no difference at all.  On the other hand, on Windows, directory junctions via mklink can be found using dir /AL /S, so they somehow differ from real directories.  Is that correct? Why have  on every line Should postdocs work only on the projects they are hired for, or can they work with other people in the same research group on other projects? Would the latter be an issue with the funding body, when the project proposal and budget only covers the expenses for hiring one postdoc? Note: it is the supervisors who got the grants, not the postdocs themselves. I'm trying to show that if $f$ is a continuous function on $[0,1]$ and $\int_0^{1} f(x)e^{nx}\,{\rm d}x = 0$ for all $n = 0, 1, 2, \dots$, then $f(x) = 0$.  I'd like to use Weierstrass approximation theorem to find a sequence of polynomials $p_m$ that converge uniformly to $f(x)$. Then we could say $\lim\limits_{m\to \infty} \int p_m(x)e^{nx}\,{\rm d}x = \int f(x)e^{nx}\,{\rm d}x = 0$, but I'm struggling to deduce that then all the $p_m$ are zero which would give the result. Itemize: Identation is different between first and second line How to make a vf page with the same look &amp; feel as salesforce1, any ideas? Feed can show entries for deleted posts, which viewing them fails Just noticed this:  Someone @replied to me in a question which appropriately showed up in my feed.  I go to click on that notice in the feed, and it presents me with "Loading the question failed."  I'd show a picture, but I don't think that it's entirely relevant - I believe it's reproducible if an answer is posted, someone makes a reply, the answer is removed, then that someone else goes back in the feed to try and revisit the post.  Alternatively, why not synchronize the interface between what a 10K user sees on the site, and what they see in the app?  As a 10K user, I would expect to see deleted questions and answers. If $M^n$ is a compact topological manifold (not necessarily with additional structure), is there an upper bound on the number of charts needed to cover $M$ ? Does this bound depend on the dimension of $M$ ?  Thanks in advance...  Cheers Can you filter out certain SE sites from the hot questions list? Is it possible to filter out Stack Exchange sites from the hot questions list? How to install WhatsApp? I was given a laptop with a totally dead display. I do not want to pay to replace the broken display, but I would like to use the laptop as a server and connect to it via SSH to control it.  I have pulled out the internal hard drive from the broken laptop, and I want to install Debian GNU/Linux and the SSH server onto this HDD using a working Debian laptop.  However, the hardware in the two laptops is very different, and I am wondering what kind of problems I would run into when I plugged the drive back in to the laptop with the broken display because of this?  How would I make this work? What is the proper way for me to install a bootable copy of Linux onto a HDD that will be used by a computer with different hardware? What license to use while putting papers on the Arxiv? I am new to this and not sure what to make of all the options available. I am interested in putting a machine-learning-related preprint, which will potentially be submitted to places like NIPS/ICLR/ICML in the future.   arXiv.org perpetual, non-exclusive license to distribute this article (Minimal rights required by arXiv.org)  Creative Commons Attribution license (CC BY 4.0)  Creative Commons Attribution-ShareAlike license (CC BY-SA 4.0)  Creative Commons Attribution-Noncommercial-ShareAlike license (CC BY-NC-SA 4.0)  Creative Commons Public Domain Declaration (CC0 1.0) How to create a graph with two Y axis with different values in Excel How do you make a scatter graph with 2 Y axis (one on the left and one on the right)? I have 2 scatter graphs that I want to combine. I need to have 2 lines, both lines have the same dependent variable but have their own independent variable. Click the link "graph" below to get an idea of what I'm looking for.  (I'm using google sheets but I can also find a computer with Excel if needed) I am trying to solve a 2 part question, the first part is to expand $\sqrt{1-x}$ up to and including the term $x^2$ which I did.  This gives me $1-(0.5)x-(0.125)x^2 + ...$  However, the 2nd part of the question says that by taking $x=(1/64)$ in the expansion of part (i) -> which refers to the one above, deduce that $\sqrt 7 = 10837/4096$. How do i do this part?  EDIT (After Hint Given By SimpliFire):  $$ \sqrt{1-\frac1{64}}=\frac{\sqrt{63}}8=\frac38\sqrt7 $$ $$ =\frac83\sqrt{1-\frac1{64}}\;=\sqrt7 $$ $$ =\frac83\left(1-\frac12\left(\frac1{64}\right)-\frac18\left(\frac1{64}\right)^2\right)\; $$ $$ =\frac83\left(1-\frac1{128}-\frac1{32768}\right)\; $$ $$ =\frac83\left(\frac{32768}{32768}-\frac{256}{32768}-\frac1{32768}\right)\; $$ $$ =\frac83\left(\frac{32511}{32768}\right)\; $$ $$ =\frac{260088}{98304} $$ $$ \frac{10837}{4096}\;\approx\sqrt7 $$  I'm not sure if I can present it like this, if it is okay i will post it as my answer :X JQuery to load Javascript file dynamically How to Delete Elements from List1 appearing in List2? In recent versions of PostgreSQL (as of Dec 2013), can we share a query between two or more cores to get a performance boost? Or should we get faster cores?