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
sertanlavr [38]
3 years ago
6

What is the interface in Java programming Language? Why do we need to use it?

Computers and Technology
1 answer:
Alenkasestr [34]3 years ago
6 0

To accustom to several different language-speaking countries. One program is often used internationally so having a language setup is very important.

You might be interested in
Identical objects are placed in Beaker A and in Beaker B. The objects float as shown in the diagrams below. What can you conclud
yaroslaw [1]
Which beaker has the object floating?
6 0
3 years ago
5.17 (Calculating Sales) An online retailer sells five products whose retail prices are as follows: Product 1, $2.98; product 2,
Dima020 [189]

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

   

    //Initialize the prices as constants

    final double PRODUCT_1_PRICE = 2.98;

    final double PRODUCT_2_PRICE = 4.50;

    final double PRODUCT_3_PRICE = 9.98;

    final double PRODUCT_4_PRICE = 4.49;

    final double PRODUCT_5_PRICE = 6.87;

   

    //Declare the other variables

    int productNumber, quantitySold;

    double total = 0.0;

   

    //Create a Scanner object to get input

    Scanner input = new Scanner(System.in);

   

    //Create a while loop

    while(true){

        //Ask the user to enter the productNumber

     System.out.print("Enter the product number or 999 to quit: ");

     productNumber = input.nextInt();

     

     // Stop the loop, if productNumber is 999(sentinel value, you may choose any value you want)

     if(productNumber == 999)

         break;

     

     //Ask the user to enter the quantitySold

     System.out.print("Enter the quantity sold: ");

     quantitySold = input.nextInt();

     

     //Create a switch statement that works depending on the productNumber entered.

     //For example, if the productNumber is 1, it multiplies the quantitySold by PRODUCT_1_PRICE

     //   and adds the result to the total. If productNumber is 2, it does the same for product 2 ...

     switch(productNumber){

         case 1:

             total += quantitySold * PRODUCT_1_PRICE;

             break;

         case 2:

             total += quantitySold * PRODUCT_2_PRICE;

             break;

         case 3:

             total += quantitySold * PRODUCT_3_PRICE;

             break;

         case 4:

             total += quantitySold * PRODUCT_4_PRICE;

             break;

         case 5:

             total += quantitySold * PRODUCT_5_PRICE;

             break;

     }

    }

 

 //Print the total (when the loop is done)

 System.out.println("The total is $" + total);

}

}

Explanation:

*The code is in Java.

You may see the explanation as comments in the code.

4 0
3 years ago
Which command executed in Windows PE would transfer both the files and directory structure from one device to another device or
EleoNora [17]

Answer:

xcopy

Explanation:

xcopy (which stands for extended copy) command, was created to have several functions and ability to copy one or more folders, files or an entire directory from one location to another. It is more powerful than copy command that was seen in the first set of operating systems. It is currently being built into desktop operating systems and Microsoft windows server.

6 0
3 years ago
What are rules that enforce basic and fundamental information-based constraints?
irga5000 [103]
The
answer should be C.
8 0
2 years ago
What is the current through R1?
patriot [66]
I = V/R. So the answer is 9/200 = 0.045A = 45mA which is B
8 0
2 years ago
Other questions:
  • Which statement is true regarding the Quick Access toolbar?
    11·2 answers
  • The part of the computer that contains the brain or central processing unit is also know as the
    15·2 answers
  • 30
    5·1 answer
  • Under the assumption that there exists an unknown Turing machine encodableinc1bits that decides3-SATis inO(n10) time, give imple
    7·1 answer
  • Which of the following best explains what the profit motive pushes producers to do
    9·1 answer
  • Write a program to read a list of exam scores given as integer percentages in the range 0-100. Display the total number of grade
    10·1 answer
  • An organization's Finance Director is convinced special malware is responsible for targeting and infecting the finance departmen
    13·1 answer
  • The wildcard character * (asterisk/start) and ? (question mark) are the same and can be use interchangeably.
    6·1 answer
  • The Arizona Department of Transportation has offices throughout the state. State documents are stored on a large server in a cen
    5·2 answers
  • Can someone please help me answer the extension activity and the exit ticket. I’ll award you. Thanks❤️.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!