subject

Import java. io\.\*; import java. nio. file\.\*; public class TestFileReader { public static void main(String[] args) { Path p = Paths. get("a. txt"); try (BufferedReader in = new BufferedReader( new FileReader(p. toFile( { String line = in. readLine(); while (line != null) { String[] v = line. split("::"); String lname = v[0]; String fname = v[1]; String dept = v[2]; System. out. println(fname + " " + lname + ", dept " + dept); line = in. readLine(); } } catch (FileNotFoundException e) { System. out. println("File not found."); } catch (IOException e) { System. out. println("I/O error."); } } } (Refer to code example 15-1.) What delimiter is used to separate fields in the a. txt file?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:30
If joey was single and his taxable income was $9,500, how much would he pay in taxes each year?
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
Jake really works well with numbers and is skilled with computers but doesn't work well with others. which of the jobs discussed in this unit might be best for jake? why?
Answers: 3
question
Computers and Technology, 24.06.2019 13:30
What process should be followed while giving a reference? sam has given a reference of his previous manager in his resume. sam should him in advance that the potential employers will him.
Answers: 1
question
Computers and Technology, 24.06.2019 18:20
Acommon algorithm for converting a decimal number to binary is to repeatedly divide the decimal number by 2 and save the remainder. this division is continued until the result is zero. then, each of the remainders that have been saved are used to construct the binary number.write a recursive java method that implements this algorithm.it will accept a value of int and return a string with the appropriate binary character representation of the decimal number.my code: public class lab16{public string converttobinary(int input){int a; if(input > 0){a = input % 2; return (converttobinary(input / 2) + "" +a); } return ""; } }
Answers: 1
You know the right answer?
Import java. io\.\*; import java. nio. file\.\*; public class TestFileReader { public static void ma...
Questions
question
Health, 18.11.2020 19:40
question
Mathematics, 18.11.2020 19:40
question
English, 18.11.2020 19:40
question
Mathematics, 18.11.2020 19:40
Questions on the website: 13722361