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: whats wrong with my IDE

  1. #1
    Java kindergarten chronoz13's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    659
    Thanks
    177
    Thanked 30 Times in 28 Posts

    Exclamation whats wrong with my IDE

    import java.io.*;
     
    public class Sample
     
    {
     
        private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
     
        public static void main(String[] args)throws IOException
     
        {
            String word;
     
            System.out.print("Enter A Word:  ");
            word = br.readLine( );
     
        }
     
    }

    this is just the code(so simple)

    the output is this

    -----------------
    Enter A Word: Enter A Word:

    ------------------

    two outputs of print??

    something's possesed my IDE........



  2. #2
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: whats wrong with my IDE

    What IDE do you use?

    Mine only prints it once

    // Json

  3. #3
    Java kindergarten chronoz13's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    659
    Thanks
    177
    Thanked 30 Times in 28 Posts

    Default Re: whats wrong with my IDE

    i've already solved it ..

    the spacing after the String output

    anyway ... netbeeeeans... hehehe

Similar Threads

  1. Generation of Palindrome number in Java
    By tina.goyal in forum What's Wrong With My Code?
    Replies: 3
    Last Post: May 26th, 2009, 08:49 AM
  2. [SOLVED] Difference between public and private variable and their uses
    By napenthia in forum Java Theory & Questions
    Replies: 1
    Last Post: April 22nd, 2009, 11:36 AM