online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/*Programe la clase Libro */ class Libro{ String titulo; int paginas; int alto; static int cantidad; Libro(int tipo){ titulo = "Desconocido"; setPaginas(tipo); cantidad++; } Libro(int tipo, String titulo, int alto){ this(tipo); this.titulo = titulo; this.alto = alto; } void setPaginas(int tipo){ if(tipo==1) paginas = 200; else paginas = 500; } public String toString(){ return "Título : " + titulo + "\n" + "Paginas : " + paginas + "\n" + "Alto : " + alto + "\n" + "Cantidad: " + cantidad + "\n"; } public static void main(String[] args){ Libro libro1 = new Libro(1); System.out.println("libro1\n" + libro1); Libro libro2 = new Libro(2, "Java 17", 25); System.out.println("libro2\n" + libro2); } }

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