Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Write a function in Java that receives a 4-digit integer value and returns the result value in reverse order of the numbers in this number.

int a=Integer.parseInt(request.getParameter("number

Write a function in Java that receives a 4-digit integer value and returns the result value in reverse order of the numbers in this number.

int a=Integer.parseInt(request.getParameter("number

Write a function in Java that receives a 4-digit integer value and returns the result value in reverse order of the numbers in this number.

int a=Integer.parseInt(request.getParameter("number").toString());

int qian=a/1000;

int bai =(a%1000)/100;

int shi=(a%100)/10;

int ge=a%10;

int b=ge*100shi*10bai*1qian;

System.out.println("before:"+a+"after"+b);

This It is received from the page. I don’t have an environment or a test. See if it works.