online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/****************************************************************************** Online Java Compiler. Code, Compile, Run and Debug java program online. Write your code in this editor and press "Run" button to execute it. *******************************************************************************/ import java.io.*; public class Main { public static void main(final String[] args) { String password = PasswordField.readPassword("Enter password:"); System.out.println("Password entered was:" + password); } } class PasswordField { public static String readPassword (String prompt) { EraserThread et = new EraserThread(prompt); Thread mask = new Thread(et); mask.start(); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String password = ""; try { password = in.readLine(); } catch (IOException ioe) { ioe.printStackTrace(); } et.stopMasking(); return password; } } class EraserThread implements Runnable { private boolean stop; public EraserThread(String prompt) { System.out.print(prompt); } public void run () { while (!stop){ System.out.print("\010*"); try { Thread.currentThread().sleep(1); } catch(InterruptedException ie) { ie.printStackTrace(); } } } public void stopMasking() { this.stop = true; } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue