Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Can Anyone Explain the Output of This Program

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 44
    Answer it

    import java.util.*;
    public class Input {

        public static void main(String[] args) {
            Scanner s=new Scanner(System.in);
            System.out.println("Enter something");
            int a=s.nextInt();
            System.out.println("The thing entered is:"+a);
            Scanner w=new Scanner(System.in);
            System.out.println("Now enter a string");
            String q=s.nextLine();
            System.out.println("The entered String is:"+q);
            
        }

    }

 0 Answer(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: