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, 22.06.2019 13:30
In which phase does software coding and testing happen in the spiral model? the spiral model does not have a separate testing phase. both, software coding and testing occurs during the phase.
Answers: 3
question
Computers and Technology, 22.06.2019 22:00
Consider the following declarations (1, 2, 3, 5, 7)class bagtype{public: void set(string, double, double, double, double); void print() const; string getstyle() const; double getprice() const; void get(double, double, double, double); bagtype(); bagtype(string, double, double, double, double); private: string style: double l; double w; double h; double price; }; a.) write the definition of the number function set so that private members are set according to the parametersb.) write the definition of the member function print that prints the values of the data membersc.) write the definition of the default constructor of the class bagtype so that the private member variables are initialized to "", 0.0, 0.0, 0.0, 0.0, respectively d.) write a c++ statement that prints the value of the object newbag.e.) write a c++ statement that declares the object tempbag of type bagtype, and initialize the member variables of tempbag to "backpack", 15, 8, 20 and 49.99, respectively
Answers: 3
question
Computers and Technology, 23.06.2019 20:30
If chris has a car liability insurance, what damage would he be covered for
Answers: 1
question
Computers and Technology, 23.06.2019 21:40
language consists of basic components, and they are called a. 3; mental images, concepts, and speech b. 2; language acquisition and linguistic relativity c. 3; heuristics, algorithms, and analogies d. 4; phonemes, morphemes, syntax, and semantics e. 2; words and grammar
Answers: 3
You know the right answer?
Import java. io\.\*; import java. nio. file\.\*; public class TestFileReader { public static void ma...
Questions
question
Mathematics, 25.08.2019 13:50
question
History, 25.08.2019 13:50
question
History, 25.08.2019 13:50
question
Mathematics, 25.08.2019 13:50
question
World Languages, 25.08.2019 13:50
question
Mathematics, 25.08.2019 13:50
Questions on the website: 13722360