online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
import java.io.FileOutputStream; import java.io.IOException; public class App { public void writeMessageToFile(String filename, String message) { try (FileOutputStream fos = new FileOutputStream(filename)) { byte[] messageBytes = message.getBytes(); fos.write(messageBytes); System.out.println("Successfully wrote message to " + filename); } catch (IOException e) { System.err.println("Error writing file: " + e.getMessage()); } } public static void main(String[] args) { App app = new App(); String message = "This message will be converted into raw bytes in ASCII format. "+ "These bytes are written to a file using FileOutputStream"; app.writeMessageToFile("message.bin", message); } }

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