online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
public class Main { public static void main(String[] args) { // instead of declaring separate variables ... /* String name1 = "Tom"; String name2 = "Richard"; String name3 = "Harriet"; */ // use an array // one variable which holds 3 elements String[] names = new String[]{"Tom","Richard","Harriet"}; // access using zero-based index System.out.println( "The first name on the list is " + names[0] +"."); System.out.println( "And " + names[1] + " is next." ); // can also use the index to change names[0] = "Thomas"; System.out.println( "The first name is now " + names[0] +"." ); } }

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