1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
m_a_m_a [10]
3 years ago
14

import java.io\.\*; import java.nio.file\.\*; public class TestFileReader { public static void main(String[] args) { Path p = Pa

ths.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?
Computers and Technology
1 answer:
Charra [1.4K]3 years ago
6 0

Answer:

The delimiter use is "::".

Explanation:

The Java inbuilt String.split( ) function is use to split a String into an array of String.

The split( ) takes delimiter as arguments/parameter which determines at which point the string is to be broken down into different part/token.

From the above code snippet;

Each line in the file a.txt that is not null is splitted using the statement below:

String[ ] v = line.split("::");

The line is splitted using "::" as delimiter and the resulting array is then assigned to the variable 'v'.

For instance, a line in the file could take the form:

John::Smith::Music

When it is splitted,

String lname = John;

because lname make reference to index 0 of the array.

String fname = Smith;

because fname make reference to index 1 of the array.

String dept = Music;

and dept make reference to index 2 of the array.

You might be interested in
Which type of keyboard improves accuracy and reduces the strain on the wrists?
klasskru [66]
That would be an Ergonomic keyboard, due to the fact that it is laid out in such a way that doesn't harm your wrists
4 0
3 years ago
Read 2 more answers
PLEASE HELP QUICKLY, I WILL GIVE BRAINLIEST TO THE BEST ANSWER!
dmitriy555 [2]

Answer:

If there are multiple schools in the teams table with the same name, each one of those rows will get joined to matching rows in the players table.

Explanation:

the answer must be match join?

6 0
3 years ago
How can you get access to Help in Excel? Which of the following are correct ways to get to help?
kvv77 [185]

1. F1

3.Lightbulb

5.tell me what you want to do

6. the ? on the top-right corner in backstage view​

6 0
3 years ago
1. Conflict resolution is the process of solving disputes and disagreements.
Rufina [12.5K]

1. It should be the use of communication (False)

2.Yes, they do have overall responsibility, so that would be True!

3. B) would be your right answer. If any questions remain, please, don't be scared to comment below

i know things kidz ;3

~chealafi~

4 0
3 years ago
Read 2 more answers
During the morning of a website launch for a new government sponsored healthcare portal, an unknown political rival, individual,
Softa [21]

The likely reason for the attack is an act of hacktivism as a way for the hacker to spread messages for their own agenda.

From the complete information given, during the morning of a website launch for a government-sponsored program, an unknown political rival had access to the server and the content showed human rights campaigns.

This is quite different from the original intent of the message to be sent. In this case, the reason for the attack is that the hacker wants to pass their own message to the people.

Read related link on:

brainly.com/question/25682883

4 0
3 years ago
Other questions:
  • Which are the best examples of costs that should be considered when creating a project budget?
    11·1 answer
  • What authentication protocol is ticket-based and is used by windows computers that are members of an active directory domain?
    13·1 answer
  • The difference between natural and technological system
    9·1 answer
  • Bushman and bonacci (2004) found that prejudiced participants were ____ likely to return a lost e-mail that had been addressed t
    5·1 answer
  • How will using ascending order on a field that contains dates sort a list?
    12·2 answers
  • Iglesias intends to use a word processing program to create a web page. Which of these options should Iglesias use?
    14·1 answer
  • What is the preferences of occupation in ones life?
    14·1 answer
  • Which of the following is NOT a type of insurance fraud?
    14·2 answers
  • What goes in between the < > when declaring a new ArrayList?
    14·1 answer
  • Which type of information should never be given out on social media?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!