Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Very new to java taking 101 at school and could use some help with my code

  1. #1
    Junior Member
    Join Date
    Sep 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Very new to java taking 101 at school and could use some help with my code

    //class TypingTest{

    public static void main(String[] args) {

    System.out.println("Typing Speed Timer ");
    System.out.println("_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _");
    System.out.println("Welcome Enter Name");

    Scanner myScanner = new Scanner(System.in);

    String lineSeporator = System.getProperty("line.separator");

    myScanner.useDelimiter(lineSeparator); ////////////////////////////////// this is my problem line it look exactly like the book but i cant tell why it is stopping when it complies

    String name;

    System.out.println("Please Enter Your name");
    name = scanner.next( );

    System.out.println("Welcome Enter Name");


    }
    }



    any help or explanation of what i did wrong would be much appreciated


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Very new to java taking 101 at school and could use some help with my code

    Please post your code in code tags. You can learn how in the Announcemements stickie at the top of the What's Wrong With My Code Forum.

    What's wrong with your code? If there are errors, post them. If the results were not as expected, describe the differences and/or post sample runs of the "wrong" results. If you're having trouble explaining, you might want to post the assignment so we can do our own comparison, but it's best if you tell us what's "wrong".

  3. #3
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,545
    My Mood
    Grumpy
    Thanks
    0
    Thanked 167 Times in 158 Posts

    Default Re: Very new to java taking 101 at school and could use some help with my code

    String lineSeporator = System.getProperty("line.separator");
    myScanner.useDelimiter(lineSeparator);
    Spelling!
    Improving the world one idiot at a time!

Similar Threads

  1. Replies: 1
    Last Post: September 9th, 2013, 11:26 AM
  2. help taking code from java class put it in JSP page.
    By anavagomez in forum What's Wrong With My Code?
    Replies: 0
    Last Post: April 26th, 2012, 10:57 AM
  3. Beauty School student taking JAVA? doesn't work out so well, NEED HELP!
    By tmihans in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 20th, 2011, 07:58 AM
  4. Problem with code for school assignment?
    By Mellisa315 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: December 16th, 2010, 09:36 PM
  5. need help with bea 101
    By anonimus83 in forum Java Theory & Questions
    Replies: 1
    Last Post: December 15th, 2009, 06:46 AM