The code won't compile…

  • 6
  • Locked
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.
You can't complete this task, because you're not signed in.
Comments (8)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Michael
Level 10 , Dresden, Germany
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!
ImDevin
Level 15 , Old Town, United States
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! 😵😱😤👿
flintstones
Level 10 , Bolton, United Kingdom
26 January 2021, 18:04
Took me ages to see the typo in the while loop. IntelliJ just ignored it!!
orangepeeler
Level 14 , Not in list, United States
27 August 2020, 01:35
wow. would not have liked combing through that code trying to figure out what was wrong. Thanks intellij!
June Sung Park
Level 41 , Yangp'yong, Korea, Republic of
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.
Daniel
Level 15 , Colnbrook, United Kingdom
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).
Andrei
Level 41
16 November 2020, 09:30
Yes! Thank you. :) I was starting to panic a bit, lol.
Khurram
Level 16 , Lahore, Pakistan
25 September 2018, 06:22
closely check the while loop