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
Fantom [35]
3 years ago
7

Which of the following patterns should be used for the delimiter to read one character at a time using a Scanner object's next m

ethod? 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]+");
Computers and Technology
1 answer:
Alex Ar [27]3 years ago
6 0

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.  
You might be interested in
If you are asked to list your favorite websites in no particular order, you are relying on
joja [24]
If u get them in the right order and what u think are ur favourite websites in any order
5 0
3 years ago
HURRY 50 POINTS A human is needed to create the algorithms that computers use.<br> True<br> False
uranmaximum [27]

Answer:False

Explanation:Took the test before

8 0
3 years ago
Read 2 more answers
Which of the following is NOT one of the four steps preparing for sales forecast ?
ehidna [41]
Can you post the answers plz
4 0
3 years ago
If the ____________ is broken on a laptop, chances are other parts are also broken.
lana66690 [7]

Answer:keyboard

Explanation:

5 0
3 years ago
Which is a good plan for backing up data?
Ymorist [56]
A, use external storage media such as CDs.
4 0
4 years ago
Other questions:
  • Coretta is thinking about which careers she would enjoy. She considers her personal skills and interests. She enjoys reading and
    13·2 answers
  • A primary mailing list for new vulnerabilities, called simply __________, provides time-sensitive coverage of emerging vulnerabi
    10·1 answer
  • Which program has an indexed version of the NIST NSRL of MD5 hashes that can be imported to enhance searching for and eliminatin
    10·1 answer
  • A simple algorithm for handling requests works like this:________ a) all requests users make are stored. b) The elevator priorit
    15·2 answers
  • What are the disadvantages of cloud computing?
    9·1 answer
  • Network Industries, Inc., wants to monitor its employees’ electronic com-munications. To avoid liability under laws related to e
    12·1 answer
  • A corporation needs an operating system that allows the various teams in its office to network and collaborate on projects. Whic
    13·2 answers
  • Which of the following algorithms is the same as the flowchart shown below?
    9·1 answer
  • A mobile operating system is stored on a ___ chip.​
    11·1 answer
  • Explain the role and importance of ict in daily life ?​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!