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
DIA [1.3K]
3 years ago
12

The datatype returned by the JOptionPane.showInputDialog method is

Computers and Technology
1 answer:
4vir4ik [10]3 years ago
5 0

Answer:

String

Explanation:

JOptionPane is a convenience swing class which displays different kinds of dialog boxes.Input dialog in particular represents prompts the user for some input. There are several polymorphic forms for this function with the most basic form being:

public static String showInputDialog(Object prompt)

As we can see the return type for this function is of type String which captures the value entered by the user on the dialog box.

You might be interested in
This function receives first_name and last_name, then prints a formatted string of "Name: last_name, first_name" if both names a
pishuonlain [190]

Answer:

Following are the program in the C++ Programming Language.

//set header file

#include <iostream>

//set namespace

using namespace std;

//define class

class format

{

//set access modifier

public:

//set string type variable

 string res;

//define function

 void names(string first_name, string last_name)

 {  

//set if-else if condition to check following conditions

   if(first_name.length()>0 && last_name.length()>0)

   {

     res="Name: "+last_name+", "+first_name;

   }

   else if(first_name.length()>0 and last_name.length()==0)

   {

     res="Name: "+first_name;

   }

   else if(first_name.length()==0 and last_name.length()==0)

   {

     res="";

   }

 }

//define function to print result

 void out(){

   cout<<res<<endl;

 }

};

//define main method

int main() {

//set objects of the class

 format ob,ob1,ob2;

//call functions through 1st object

 ob.names("John","Morris");

 ob.out();

//call functions through 2nd object

 ob1.names("Jhon","");

 ob1.out();

//call functions through 3rd object

 ob2.names("", "");

 ob2.out();

}

<u>Output</u>:

Name: Morris, John

Name: Jhon

Explanation:

<u>Following are the description of the program</u>:

  • Define class "format" and inside the class we define two void data type function.
  1. Define void data type function "names()" and pass two string data type arguments in its parameter "first_name" and "last_name" then, set the if-else conditional statement to check that if the variable 'first_name' is greater than 0 and 'last_name' is also greater than 0 then, the string "Name" and the following variables added to the variable "res". Then, set else if to check that if the variable 'first_name' is greater than 0 and 'last_name' is equal to 0 then, the string "Name" and the following variable "first_name" added to the variable "res".
  2. Define void data type function "out()" to print the results of the variable "res".
  • Finally, we define main method to pass values and call that functions.
3 0
3 years ago
An oil company is investigating whether they are likely to find oil at a certain site. They will use an expert system to help th
11Alexandr11 [23.1K]
The expert system are given inputs such as questions, locations and information. The expert system processes and advice the user on what to do. If the user inputs the location of an oil site and ask a question if they are able to drill an oil out of the site, then the expert system calculates and gives you the answer you need. Though the expert system makes errors just like humans.
6 0
3 years ago
Suppose that TCP's current estimated values for the round trip time (estimatedRTT) and deviation in the RTT (DevRTT) are 350 mse
lorasvet [3.4K]

Answer:

260

Explanation:

I hope it helps choose me the brainest

7 0
3 years ago
You are a software engineer at a company where management routinely encourages you and your colleagues to use pirated software.
s2008m [1.1K]

Answer:

That’s highly illegal. You should notify them that it is illegal. And, if they continue, you should notify the legal team. If it continues, you either need to leave the company or notify the proper authorities.

7 0
3 years ago
Please pleas please help!!
shutvik [7]

Answer:

#404

Explanation:

logical

3 0
3 years ago
Read 2 more answers
Other questions:
  • A network administrator is implementing multifactor authentication for employees who travel and use company devices remotely by
    14·1 answer
  • A _______ is a piece of computer hardware used for the modulation and demodulation of data between digital and analog formats.
    10·1 answer
  • A. True
    8·2 answers
  • PowerPoint’s _____ feature can assist you in finding answers to questions such as “How can I specify which slides to print?” a.
    6·1 answer
  • In the case below, the original source material is given along with a sample of student work. Determine the type of plagiarism b
    7·1 answer
  • Which term describes computers (e.g., Windows PC, Mac OS X) with applications that allow a person to perform diverse tasks, from
    5·1 answer
  • When a pitcher is holding a baseball, the ball has ______energy.
    9·2 answers
  • I need somebody to help me with this question I’ll give points!<br> Please help no funny business
    14·1 answer
  • BRAINLIEST 14 points
    7·2 answers
  • Write any three primary activities of a program??​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!