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: Netbeans not printing to built-in output console

  1. #1
    Junior Member
    Join Date
    Jun 2019
    Posts
    2
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default Netbeans not printing to built-in output console

    I know I have code that should work. I copied it straight from the book. I checked it myself and it is good.

    Once I run the program in the IDE, the output should be on the lower output panel yet nothing comes out. The build was successful according to that panel but nothing is printed.

    Is there some kind of configuration I need to modify for this to run? My IDE is set for Java 8 which I am using.

     
     
    public class SpaceRemover {
         public static void main(String[] args) {
             String mostFamous = "Rudolph the Red-Nosed Reindeer";
             char[] mfl = mostFamous.toCharArray();
             for (int dex = 0; dex < mfl.length; dex++) {
                 char current = mfl[dex];
                 if (current != ' ') {
                     System.out.print(current);
                 } else {
                     System.out.print('.');
                 }
             }
             System.out.println();
         }
    }

  2. The Following User Says Thank You to ChristianAntfeld For This Useful Post:


  3. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: Netbeans not printing to built-in output console

    The code works for me.
    I don't use Netbeans and don't know what your problem with that IDE could be.
    If you don't understand my answer, don't ignore it, ask a question.

  4. #3
    Junior Member
    Join Date
    Jun 2019
    Posts
    2
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default Re: Netbeans not printing to built-in output console

    I've downloaded Eclipse to try the code in there so I'll likely remove this post if the code runs in there. Thank you for checking for me.

  5. The Following User Says Thank You to ChristianAntfeld For This Useful Post:


Similar Threads

  1. Not printing in console. What am i missing?
    By crgb1202 in forum What's Wrong With My Code?
    Replies: 9
    Last Post: April 2nd, 2018, 10:10 AM
  2. Replies: 5
    Last Post: September 7th, 2014, 08:25 AM
  3. Printing A TreeNode/Node To Console..
    By Kumarrrr in forum File I/O & Other I/O Streams
    Replies: 0
    Last Post: March 17th, 2010, 12:35 AM
  4. printing output to console & to a text file at the same time...
    By prasanna in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: August 26th, 2009, 03:43 AM