-5

int x= 2;

int y= 2;

int z= (?);

System.out.println(z);

I want it to print 22 instead of 4

1 Answers1

0

You can use them as strings and parse it

    String s=x+""+Y;
    Integer.parseInt(s);
Massimo Petrus
  • 1,881
  • 2
  • 13
  • 26