We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 035aa8d commit 663ef33Copy full SHA for 663ef33
interpreter/core/computer/terminal/languages/java.py
@@ -45,8 +45,8 @@ def run(self, code):
45
class_name = match.group(1)
46
file_name = f"{class_name}.java"
47
48
- # Write the Java code to a file
49
- with open(file_name, "w") as file:
+ # Write the Java code to a file, preserving newlines
+ with open(file_name, "w", newline='\n') as file:
50
file.write(code)
51
52
# Compile the Java code
0 commit comments