online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
import java.io.* ; // Libreria per BufferedReader ed InputStreamReader. class Persona { private int peso , altz ; //I costruttori si possono omettere. public void setAltezza(int x) { altz = x ; } public int getAltezza() { return altz ; } //...mancano i metodi per il peso... } class Main { public static void main( String[] args ) throws Exception //Le funzioni di I/O generano eccezioni. { Persona p1 , p2 ; p1 = new Persona() ; p2 = new Persona() ; // Prepara lettura dalla tastiera bufferizando l'input. BufferedReader in = new BufferedReader( new InputStreamReader( System.in ) ) ; System.out.print( "Altezza persona 1: " ); p1.setAltezza( Integer.parseInt( in.readLine() ) ) ; // Lettura e assegnazione (set). //...leggere i restanti dati... System.out.println( "Altezza persona 1: " + p1.getAltezza() ) ; // Prelievo (get) e stampa. //...stampare i restanti dati... } }

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