can any one tell how to remove this error??
import java.util.*; import java.lang.*; class sample { public static void main(String args[]) { int x,y,z; Scanner sc=new Scanner(System.in); System.out.print("\n\tenter 1st value:"); boolean b=sc.hasNextInt(); if(b==true) { x=sc.nextInt(); System.out.print("\n\tX:"+x); } else { do { System.out.print("\n\tinvalid value:"); System.out.print("\n\tenter 1st value:"); x=sc.nextInt(); }while(b=false); } Scanner sc=new Scanner(System.in); System.out.print("\n\tenter 2nd value:"); boolean b=sc.hasNextInt(); if(b==true) { y=sc.nextInt(); System.out.print("\n\tY:"+y); } else { do { System.out.print("\n\tinvalid value:"); System.out.print("\n\tenter 1st value:"); x=sc.nextInt(); }while(b=false); } z=x+y; System.out.print("\n\tRESULT:"+z); } }