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
What is true of softboxes?
gizmo_the_mogwai [7]
Softboxes have an umbrella on the front. The answer to your question is A. I hope that this is the answer that you were looking for and it has helped you.
4 0
4 years ago
Read 2 more answers
What should be the extension to execute files?
Ganezh [65]
The correct answer is D. All of the above. Each of these extensions are able to execute files depending on what type of information the file contains.
5 0
3 years ago
Call 334-399-4201 to annoyed my mom
yaroslaw [1]

Answer: why...

Explanation:

3 0
4 years ago
What are some of the general components of an IDE?
AysviL [449]

Answer:

An IDE normally consists of a source e editor, build automation tools. Most modern IDEs have intelligent code completion. Some IDEs contain a compiler, interpreter, or both.

5 0
3 years ago
a_____________ may have its value change during program execution. options. flowchart,counter, Algorithm,None of them​
Amiraneli [1.4K]

Answer:

i think is "none of them"

5 0
4 years ago
Other questions:
  • Jesse purchases a new smartphone and is immediately able to use it to send a photo over the Internet to a friend who lives in a
    12·1 answer
  • In 1–2 sentences describe how you would insert a row in a spreadsheet.
    6·2 answers
  • Wordwrap forces you to stop typing words and press the enter key at the end of each line.
    12·1 answer
  • Adding a ____ to text adds depth and helps the letters display prominently.
    5·1 answer
  • 10 points (sorry it won’t let me do more points)
    10·1 answer
  • Henrietta, the owner of a very successful hotel chain in the Southeast, is exploring the possibility of expanding the chain into
    15·1 answer
  • Every call to a recursive function has its own code and its own set of ____ and local variables
    5·1 answer
  • I need help so bad it’s the entire test for EdHesive python coding Test 2
    5·1 answer
  • PLS HELP WITH MY PYTHON HW ILL GIVE YOU BRAINLIEST
    12·1 answer
  • Which option is an example of an algorithm that is used in daily life?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!