1 Reply Latest reply on Mar 7, 2014 4:15 AM by rp0428

    Int Problem in Java


      Please Help me, I am having a problem withs ints, I think. Here is my code, someone please help me.


      import java.util.Scanner;



      public class Start {


        public static void main(String[] args) {

        System.out.println("Hi, Welcome to the Game, made by the sebagius7110 of the programpassions.ucoz.net website!");

        System.out.println("Please Type in the following Information...");




        Scanner scan = new Scanner(System.in);


        try {


        System.out.println("Please Enter Your Name:");

        int TypeName = scan.nextInt();

        System.out.println("Is This Your Name:" + TypeName);


        System.out.println("Please Enter Your Age:");

        int TypeAge = scan.nextInt();

        System.out.println("Is This Your Age:" + TypeAge);


        System.out.println("Please Enter Your Email:");

        int TypeEmail = scan.nextInt();

        System.out.println("Is This Your Email:" + TypeEmail);


        System.out.println("Please Enter A Username:");

        int TypeUsername = scan.nextInt();

        System.out.println("Is This Your Username:" + TypeUsername);


        System.out.println("Please Enter A Password:");

        int TypePassword = scan.nextInt();

        System.out.println("Is This Your Password:" + TypePassword);


        System.out.println("Please Confirm Your Password:");


        int TypePasswordConfirm = scan.nextInt();


        System.out.println("Please Confirm Your Email:");


        int TypeConfirmPassword = scan.nextInt();


        System.out.println("Please Enter This Code To Continue: ABC123!~`");


        int TypeThisCode = scan.nextInt();




        System.out.println("Is This Your Information?");

        System.out.println("Name:" + TypeName);

        System.out.println("Age:" + TypeAge);

        System.out.println("Email:" + TypeEmail);

        System.out.println("Username:" + TypeUsername);

        System.out.println("Password:" + TypePassword);


        System.out.println("Is This Right?");



        int YesNo = scan.nextInt();

        } catch (Exception ex) {

        System.out.println("An Unexpected Internal Error Has Occured, Please Contact an Administrator of the program or ask for help on the forum");


        System.out.println("Exception Type: " + ex);










        • 1. Re: Int Problem in Java
          Please Help me, I am having a problem withs ints, I think. Here is my code, someone please help me.

          And why did you think saying 'I am having a problem' and posting a bunch of code would tell us anything?


          You have to SHOW us what you are doing not just post code. You also have to SHOW us what results you are getting and why you think those results are wrong.


          You also need to tell us WHY you think you are having a problem with ints.


          Reread what you posted and ask yourself if you provided enough info for anyone to help you.