A developer pensively scratching her head while reviewing code is a sign that it won't compile! You must resign yourself to such situations and not be nervous. Here's some practice: The program reads in two file names. It copies the first file to the location specified by the second file name. And yes, the program doesn't work. Fix the mistake.
The code won't compile…
- 6
Locked
Comments (8)
- Popular
- New
- Old
You must be signed in to leave a comment
Michael
4 December 2021, 21:07
l could not 'solve' this task. Even when I downloaded the solution, it took me a while to see what is going on. Do not think, just observe. There is a beginner's typo in the while loop. Really something veeery basic!
+2
ImDevin
13 May 2021, 01:05
after a bit of panic (don't know what these are; never seen these things are, etc), read the code a few times and just tried to follow the logic and solved it, BUT WTFrenchToast? the point of this task was?????? don't know. not even gonna try to figure it out. moving on! 😵😱😤👿
+3
flintstones
26 January 2021, 18:04
Took me ages to see the typo in the while loop. IntelliJ just ignored it!!
0
orangepeeler
27 August 2020, 01:35
wow. would not have liked combing through that code trying to figure out what was wrong. Thanks intellij!
0
June Sung Park
3 April 2020, 02:52
The content of the source file should be assigned to InputSteeam, and the content of the destination file should be assigned to OutputStream. There's a typo in the while loop. You may leave the "Input data" panel empty.
+5
Daniel
8 March 2020, 12:13
Hah. Before you panic and think "OMG I don't know this", take a deep breath in and realize you are studying Java syntax(hint here: punctuation is important, and IDE doesn't always spot possible syntax errors ) and although you are learning Java, you are still learning the logic of programming(hint 2: you take something (file content) and move it from source(input) to destination(output).
+4
Andrei
16 November 2020, 09:30
Yes! Thank you. :) I was starting to panic a bit, lol.
0
Khurram
25 September 2018, 06:22
closely check the while loop
+12