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
Rom4ik [11]
3 years ago
5

Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output tho

se four values on a single line separated by a space.
Computers and Technology
1 answer:
kotegsom [21]3 years ago
6 0

Answer:

import java.util.Scanner;

public class ANot {

   public static void main(String[] args) {

Scanner in = new Scanner(System.in);

// Prompt user for an integer

       System.out.println("Please enter an Integer");

       int intNum = in.nextInt();

       // Prompt user for an double

       System.out.println("Please enter a double");

       double DoubleNum = in.nextDouble();

       // Prompt user for a character

       System.out.println("Please enter a Character");

       char charNum = in.next().charAt(0);

       // Prompt user for a String

       System.out.println("Please enter a String");

       String StringNum = in.next();

       System.out.println(intNum+" "+DoubleNum+" "+charNum+" "+StringNum);

   }

}

Explanation:

We import the Scanner class in order to receive user input. Then we create four different variables of type int, double,char and String to hold the values entered by the user.

To display the output on a single line, we use string concatenation (using the + operator) to acheive this.

You might be interested in
4. In a relational database, entities are defined by
Inessa [10]

Answer:

C. attributes

Explanation:

A relational database is a database system that stores information within its servers. It has rows and columns that contain the data stored in them and which can be accessed at any time with the right administrative privileges.

In a relational database, entities are defined by their attributes. This is because an entity is the data that needs to be stored so, the attribute specifies that information and gives its value.

3 0
3 years ago
5.William travels a lot on business purpose. He needs to regularly communicate with his business partner. He also needs to send
FromTheMoon [43]

Microsoft Online is free to use. It includes Microsoft Excel, Word, One - Note and PowerPoint.  Microsoft Outlook (email app) is free as well, although it is a seperate download.

Another way to go is via Google docs, The Google drive is rather large and safe to store reports, docs, images, etc.

Both Microsoft online and Google Docs are accessible to use on virtually any device as in: PCs, Laptops, Tablets, Androids and Iphones.


4 0
3 years ago
What is web <br>searching engine ?​
Nikolay [14]
A Web search engine is a specialized computer server that searches for information on the Web. The search results of a user query are often returned as a list. The hits may consist of web pages, images, and other types of files.
4 0
3 years ago
Explaing why the findings are different between a general purpose search engine ( google) and a meta search engine ( ask jeeves)
Softa [21]
A lot of people use google and on all search engines the sites are ordered in what people click on the most. Popularest website that fits in with the key words and different people used different websites and different search engines
6 0
3 years ago
3. with a dui charge on a driver’s record ______________. a. the price of his or her insurance greatly increases b. he or she ma
djyliett [7]
<span>The answer to your question is D. both A and C</span>
7 0
4 years ago
Other questions:
  • 24 bit or 16 million colors is often called?
    7·1 answer
  • Which tab is used to edit objects on the slide master and layouts
    10·1 answer
  • Assume:
    14·1 answer
  • Instructions:Select the correct answer.
    8·2 answers
  • Which words in the sentence make up the adjective phrase? Which word does the adjective phrase modify? The farmer delivers five
    15·1 answer
  • Usually, the same software that is used to construct and populate the database, that is, the DBMS, is also used to present ____.
    11·1 answer
  • What role/service is windows 2012 server backup part of?
    5·1 answer
  • PLS HELP For this activity, you can use the audio recorder on your cell phone or a digital camera to record the following sounds
    14·1 answer
  • Accessing disk is much slower than accessing memory. As a result, many file systems have been designed with various optimization
    7·1 answer
  • Define- Emerging technology
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!