1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

clear console

Discussion in 'Java' started by onzo, Oct 31, 2010.

Thread Status:
Not open for further replies.
  1. onzo

    onzo New Member

    Joined:
    Oct 31, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    i write this funtion to clear the console but it says thet clear not defined for console class


    import java.lang.*;
    import java.util.*;
    import java.io.Console;

    public void ClearConsole() {
    Console console = System.console();
    if (console == null)
    System.out.println("Couldn't get Console object !");
    console.clear();/////////// getting the error from this line
    }

    is there any other imports to write ???? or is there any other way to clear the console?
    thx
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    Duplicate of clear console. Thread closed. Please use the same thread to reply back.
     
Thread Status:
Not open for further replies.

Share This Page