Which of the following patterns should be used for the delimiter to read one character at a time using a Scanner object's next method? Scanner in = new Scanner(. . .); in.useDelimiter("[^0-9]+"); Scanner in = new Scanner(. . .); in.useDelimiter(""); Scanner in = new Scanner(. . .); in.useDelimiter("[^A-Za-z]+"); Scanner in = new Scanner(. . .); in.useDelimiter("[A-Za-z]+");

Answers

Answer 1

Answer:

The method to this question can be defined as follows:

Scanner in = new Scanner(. . .);

in.useDelimiter("");

Explanation:

Following are the code to the question:

import java.util.*;    //import package for user input

public class Main //defining class Main

{    

public static void main(String ax[])//defining the main method

{    

   Scanner in = new Scanner("Database");//crearing Scanner class object that pass value in its parameter  

   in.useDelimiter("");  //using useDelimiter

   System.out.println(in.next()); //use print method to print single character value

}    

}    

Output:

D

Code explanation:

In the above code inside the main method scanner class object "in" is created that pass value "Database" in its parameter.  In the next step, useDelimiter is used that uses the scanner class object and single space n its parameter. In the last print, the method is used that prints object value.  

Related Questions

A binary search function is searching for a value that is stored in the middle element of an array. How many times will the function read an element in the array before finding the value?

Answers

Answer: 1 time.

Explanation:

A binary function is also known as a half-interval search is a search algorithm to find the position of a given element x within a well-sorted array []. Binary search compares the target value to the middle element of the array.It ignores half of the elements just after one comparison. it compares x with the middle element.

So, the function read an element one time in the array before finding the value.

GuardIN is an IT security firm. It deals with highly secure data for a wide variety of software and e-commerce agreements, trademark licenses, and patent licenses. GuardIN needs a cloud computing option that would allow it to purchase and maintain the software and infrastructure itself. The cloud also needs to be designed in such a way that all users of the organization can access it without any lag. Which of the following cloud computing options would be most suitable for GuardIN?
A) A public cloud
B) A community cloud
C) A hybrid cloud
D) A private cloud

Answers

Answer:

D) A private cloud

Explanation:

Note we are told that GuardIN needs a cloud computing option that would allow it to purchase and maintain the software and infrastructure itself.

Thus, to be able to manage the cloud infrastructure itself; it implies buying it's own hardware equipments, which means it is best to use a private cloud computing option.

Doing so would give GuardIN the opportunity to design the cloud storage in a way that all users of the organization can access it without any lag.

Other than hard discs and flash discs, identify other three different storage media

Answers

Answer:

A storage media is any media that can store data.

1. USB flash memory

2. Memory stick

3. Floppy disk

Justify the statement "The same job title can have different job roles and different qualification criteria in different organizations." Compare job titles and their respective roles and qualifications from at least two organizations in different industries, and write a short essay explaining your reasoning.

Answers

Answer:

Below is an executive summary of this particular issue.

Explanation:

Each organization has differential requirements and preferences. This same employment opportunities rely heavily on either the structure of the company and indeed the amount of equipment that it possesses. Hence, whenever they recruit an individual on a specific job, their work description can differ based on the organization's needs including growth.

Answer:

In the classified section of a local newspaper, I came across job openings for the post of a network engineer in two different companies. One was from the airline industry, while the other was from the food and beverage industry.

The airline company required an applicant to have a bachelor's degree in network administration. The job posting specified that applicants with supporting CCENT or CompTIA Security+ certifications would be preferred. The company was willing to consider candidates with no prior experience. The job responsibilities included: maintaining security, DNS, IP routing, firewalls, and troubleshooting IT-related problems. The role also required skills to manage multi-site network operations, operating systems, and other software applications in public as well as private facilities. Another responsibility was to complete the time logs in the company's records to facilitate timely and accurate billing.

For the role of a network engineer in the food and beverage industry, the required qualification was any bachelor's degree in computer science with a minimum of one year of relevant experience. Certifications were an added advantage, but they were not a necessity. The job role required skills to troubleshoot network glitches, monitor network usage, install software and hardware infrastructure, provide technical assistance to users, and suggest improvements in the system.

Explanation:

Write a method, getFirstLine, that is passed a String argument and that returns the first line. (Recall that lines are terminated with the "\n" character.) Assume that the argument contains at least one complete, newline-terminated line.
My Solution:
public String getFirstLine(String a)
{
String[] myLines = a.split("\n");
return(myLines[0]);
}

Answers

Answer:  The answer to this question can be given as:

Method definition :

String getSecondLine (String aString) //define function getSecondLine()

{

return aString.substring(aString.indexOf("\n") + 1, aString.indexOf("\n") + 1 + aString.substring(aString.indexOf("\n") + 1, aString.length()).indexOf("\n"));

//return value.

Explanation:

A college marketing department has a networked storage device that uses the IP address 10.18.7.5, TCP port 443 for encryption, and UDP port 4365 for video streaming. The college already uses PAT on the router that connects to the Internet. The router interface has the public IP address of 209.165.200.225/30. The IP NAT pool currently uses the IP addresses ranging from 209.165.200.228-236. Which configuration would the network administrator add to allow this device to be accessed by the marketing personnel from home

Answers

Answer:

The answer to this question can be defined as follows:

Explanation:

The static NAT stands for (static Network Address Translation), which enables the user to modify a single interpretation for a local second-order to the external environment addresses, and all IP and port numbers were also transcribed inside to random traffic as well as from outside with the internal traffic.

It is used to map network traffic by an internal IP address from a static external IP address. It provides a fixed conversion for actual addresses onto maps. It offers Internet access to the network equipment via a private LAN with such a private IP address which is not recorded.Please find the attachment of the ip address.

Which of the following statements is true? A. Ethernet connections allow the most mobility for users. B. Maximum advertised connection speeds are for Wi-Fi connections only. C. Every computer user can expect the same Internet connection speed. D. The actual speed of a network can differ from the maximum advertised speeds. E. Wi-Fi is the best option for intensive Internet users who have high data

Answers

Answer:

A

Explanation:

Ethernet connections allow the most mobility for users

Employees often have more than one laptop-so one or both of them are always handheld. For this cause, companies turn to the versatility and scalability of wireless networks. It is convenient to grant workers connectivity through a wireless network, which they can use to connect several devices. Tablets, smartphones and laptops can all be connected to the network, which enables employees to access

Answer: D. The actual speed of a network can differ from the maximum advertised speeds



Explanation:

just got it correct on the test

Other Questions
Please help I don't understand this at all During the Great Recession, the U.S. budget deficit worsened as tax collections fell and payments to the poor rose. In other words, the deficit worsened as a result of _________ in the federal budget. (06.01 MC)What is the value of the expression 2 + 3^2 (3 1)? In the figure, mCED = mA. Complete the following proportions: ED/ A F= CE/? = CD/? 2/3 divided by 5?If she walks 2/3 by another 5. What is the value of the fourth term in a geometric sequence for which a1 =30 and r= 1/2 WHOEVER ANSWERS FIRST GETS BRAINLIEST:) Which expression represents the surface area of the cone? A cone with diameter 12 inches, height 8 inches, and slant height 10 inches. S A = pi r l + pi r squared (pi) (6) (10) + (pi) (6 squared) (pi) (8) (10) + (pi) (8 squared) (pi) (12) (10) + (pi) (12 squared) (pi) (10) (12) + (pi) (10 squared) PLS HELP ASAP!!!Which phrase describes the algebraic expression 8t + 7? the product of 8 and 7 more than a number the quotient of 8 and 7 8 times the sum of a number and 7 8 times a number plus 7 Bharath has made a table of content for his document, in which he wants to make few changes, but he is unable to make the changes. Give reason. Explain how he can make the necessary changes. find the distance of the line segment joining the two points (-4 /2 - /12) and (/32, 2/3) 1. A box without a top is to be made from a rectangular piece of cardboard, with dimensions 8 in. by 10 in., by cutting out square corners with side length x and folding up the sides. (a) Write an equation for the volume V of the box in terms of x. (b) Use technology to estimate the value of x, to the nearest tenth, that gives the greatest volume. Explain your process. Which of the following is an issue of food quality rather than food safety? a food handler who did not wash her hands before serving food a prep cook who uses the same cutting board for chicken and salad a bad odor associated with food food that has been time/temperature abused What is the product (-2d^2+x)(5d^-6x) Read the excerpt from Amy Tans essay Mother Tongue. I know this for a fact, because when I was growing up, my mothers limited English limited my perception of her. I was ashamed of her English. I believed that her English reflected the quality of what she had to say. That is, because she expressed them imperfectly her thoughts were imperfect. the answer is to inform readers based on Tans childhood experience What is the purpose of this text? to inform readers based on Tans childhood experience to persuade readers to speak a different way to inform readers of Tans mothers feelings to persuade readers that Tans mother is intelligent A cash register has $10 and $50 dollars bills with total of $1080.there are 28 bills in total how many of each bills. Solve for x. 60 10 20 120 "Radon: The Problem No One Wants to Face" is the title of an article appearing in Consumer Reports. Radon is a gas emitted from the ground that can collect in houses and buildings. At certain levels it can cause lung cancer. Radon concentrations are measured in picocuries per liter (pCi/L). A radon level of 4 pCi/L is considered "acceptable." Radon levels in a house vary from week to week. In one house, a sample of 8 weeks had the following readings for radon level (in pCi/L). 1.92.45.75.51.98.23.96.9 (a) Find the mean, median, and mode. (Round your answers to two decimal places.) mean 4.55 median 4.7 mode 1.9 (b) Find the sample standard deviation, coefficient of variation, and range. (Round your answers to two decimal places.) s CV % range (c) Based on the data, would you recommend radon mitigation in this house Find the volume of the figure below. Round to the nearest tenth.7 cm7 cm9 cm20 cm11 cm A cafeteria serving line has a coffee urn from which customers serve themselves. Arrivals at the urn follow a Poisson distribution at the rate of 3.0 per minute. In serving themselves, customers take about 14 seconds, exponentially distributed. a. How many customers would you expect to see, on average, at the coffee urn? (Do not round intermediate calculations. Round your answer to 2 decimal places.) Can someone help me please