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.util.*; public class Main{ public static void main(String[] args) { String names[] = {"John", "Mary", "Peter"}; Scanner myScanner = new Scanner(System.in); System.out.print("Enter name: "); String nameEntered = myScanner.nextLine(); boolean nameFound = false; for (String name : names){ if (nameEntered.equals(name)) nameFound = true; } if(nameFound) System.out.println(nameEntered + " is a common name."); else System.out.println(nameEntered + " is not a common name."); } }

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