Input three numbers through Scanner class in variables a,b c.
If a is inputted 1, b inputted null(or blank) and c inputted 3 then output should show a=1 & b=3.
If a is null(or blank), b is 1,c is 4, then output- b=1 & c=4.
If a is 1, b is 2, c is 3, then output- a=1,b=2 & c=3.

how can i get an "&" before the last variable...
I know following code will work but it's not efficient...

if(!a.equals("")&&!b.equals("")&&!c.equals("")){
System.out.println("a is "+a+", b is "+b+" & c is "+c);
}
if(a.equals("")&&!b.equals("")&&!c.equals("")){
System.out.println("b is "+b+" & c is "+c);
}
if(!a.equals("")&&b.equals("")&&!c.equals("")){
System.out.println("a is "+a+" & c is "+c);
}
if(!a.equals("")&&!b.equals("")&&c.equals("")){
System.out.println("a is "+a+" & b is "+b);
}
if(a.equals("")&&b.equals("")&&!c.equals("")){
System.out.println(" c is "+c);
}
if(!a.equals("")&&b.equals("")&&c.equals("")){
System.out.println("a is "+a);
}
if(a.equals("")&&!b.equals("")&&c.equals("")){
System.out.println("b is "+b);
}