课程: Java: Advanced Concepts for High-Performance Development
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Challenge: Input and output - Java教程
课程: Java: Advanced Concepts for High-Performance Development
Challenge: Input and output
(upbeat music) - [Instructor] Let's have a look at the challenge for this chapter. In this one there is a text file called Buffered Reader versus Scanner.txt. This exercise is going to be to write some codes that reads from this file. So there's also a class called File Reader Exercise. This has two methods in it. The first one is called Get First Line and this method should return the first line of the file and at the moment it just returns an empty string. The second one is called Gets Whole File and it should return the whole content of the file as a single string. And again, at the moment it just returns an empty string. There are some tests that will help you see if your solutions are working correctly for this exercise. So inside the test folder, inside 0605, you'll see that there is a file called File Reader Exercise Test. The first test checks that the first line is returned correctly and the second one tests…