I\'ve got stuck in a problem about local variables.
The following is not my original code but I use a simple example to present my question:
import java.
public static void main(String[] args) { Scanner userScan=new Scanner(System.in); int input1; do{ input1=userScan.nextInt(); }while(input1>10); }
just declare input1 outside of the scope of do while loop