Java Int to String

  • + 0 comments

    import java.io.; import java.util.;

    public class Solution {

    public static void main(String[] args) {
        /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
        Scanner sc = new Scanner(System.in);
        try
        {
            int value = sc.nextInt();
            if(-101 < value && value < 101){
            System.out.print("Good job");        
            }
            else {
            System.out.print("Wrong answer");    
            }
    
        }
        catch(Exception exception){
            System.out.print("Wrong answer");
    
        }
    
    
    
    }
    

    }