1 Reply Latest reply: Mar 6, 2014 10:15 PM by rp0428 RSS

    Int Problem in Java

    47041b5c-e1dc-4eea-b052-3361d8020d02

      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...");

        System.out.println();

        System.out.println();

       

        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:");

        @SuppressWarnings("unused")

        int TypePasswordConfirm = scan.nextInt();

       

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

        @SuppressWarnings("unused")

        int TypeConfirmPassword = scan.nextInt();

       

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

        @SuppressWarnings("unused")

        int TypeThisCode = scan.nextInt();

       

        System.out.println();

        System.out.println();

        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();

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

        System.out.println("Yes/No/Y/N");

        @SuppressWarnings("unused")

        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("programpassions.ucoz.net");

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

        }

       

       

       

       

        }

       

       

      }

        • 1. Re: Int Problem in Java
          rp0428
          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.