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
In the context of wireless signal propagation, the phenomenon that occurs when an electromagnetic wave encounters an obstruction
tresset_1 [31]

Answer:

Diffraction

Explanation:

Diffraction occurs when an electromagnetic waves encounter an obstruction and split in secondary waves, these waves continue the same direction that was split.

These waves going to around the object, obstacle with sharp edges could cause detraction, like tables, refrigerators chairs, walls, furniture, etc.

5 0
3 years ago
What is this on G00gel Documents , how do I fix it?
mylen [45]

Answer:

Sorry but it donest show the picture

Explanation:

7 0
2 years ago
LISTEN I NEED EVERY SINGLE BRAINLY USER TO RE POST THIS THERE IS A USER WHO JUST SAID THEY ARE GOING TO KILL THEMSELVES PLEASE C
Over [174]
WHAT IS THE NAME OF THE BRAINLY USER
7 0
3 years ago
Read 2 more answers
According to the 2010/2011 Computer Crime and Security Survey, ____ is "the most commonly seen attack, with 67.1 percent of resp
loris [4]

Answer:

Malware infection

Explanation:

Infecting computers with malware through the internet has become the most commonly seen attack according to 2010/2011 Computer Crime and Security Survey.

6 0
3 years ago
______ allows a thread to run on only one processor.
charle [14.2K]
Your answer will be A.
4 0
4 years ago
Other questions:
  • What are some of the challenges that could arise from setting up a file management system on a computer?
    8·1 answer
  • Explain the usage of the keywordtransient?
    9·1 answer
  • :3 Brainlsit included! =) 33 points!
    10·1 answer
  • Green field country is planning to conduct a cricket match between two teams A and B. a large crowd is expected in the stadium a
    6·1 answer
  • 16. Budget Analysis Write a program that asks the user to enter the amount that he or she has budgeted for a month. A loop shoul
    14·1 answer
  • Which category of management information systems (MIS) combines the forecasting capability of decision support software with the
    12·1 answer
  • Việc áp dụng khai báo hải quan điện tử có áp dụng chữ ký số, đem lại những lợi ích gì
    10·1 answer
  • To input lenth in meter and convert in to centimeter​
    6·1 answer
  • Responsible manner in video and audio conferencing​
    15·1 answer
  • Consider the following method:
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!