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
inn [45]
3 years ago
11

Where is the error in this code sequence?

Computers and Technology
1 answer:
Art [367]3 years ago
7 0

Answer:

There is an error in "String s=s1-s2 ";

Explanation:

In java programming, we can subtract subtract two strings variable with "-" operator.Java programming does not  support an overload of the '-' operator.In java, we can use only "+" operator to append two strings variable.There is no such method to subtract strings in java.Therefore in the given code String s=s1-s2 will give an "bad operand type" error because we can not subtract one string variable from the second string variable.

You might be interested in
The shortest compressed format of the ipv6 address 2001:0db8:0000:1470:0000:0000:0000:0200 is
devlian [24]

The answer is : 2001:DB80:1470::200

A double colon ( :: ) can replace any single, contiguous string of one or more 16-bit segments (hextets) which is  consist of all 0s, and it can only be used once per IPv6 address. Therefore,any leading 0s (zeros) in any 16-bit section or hextet can be omitted.

3 0
3 years ago
There is no reason to study the works of famous photographers because they will make you less creative.
weeeeeb [17]
I think it is true because you may be ‘inspired’ by a famous artist but if you’re always being inspired by others its not 100% yours / you being creative
8 0
3 years ago
Read 2 more answers
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
strojnjashka [21]

Answer:

import java.util.Scanner;

public class num8 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter month's budget");

       double monthBudget = in.nextDouble();

       double totalExpenses = 0.0;

       double n;

       do{

           System.out.println("Enter expenses Enter zero to stop");

           n = in.nextDouble();

           totalExpenses += n;

       }while(n>0);

       System.out.println("Total expenses is "+totalExpenses);

System.out.println("The amount over your budget is "+ Math.abs(monthBudget-totalExpenses));

   }

}

Explanation:

  • Using Java programming language
  • Prompt user for month's budget
  • Use Scanner class to receive and store the amount entered in a variable
  • Use a do while loop to continuously request user to enter amount of expenses
  • Use a variable totalExpenses to add up all the expenses inside the do while loop
  • Terminate the loop when user enters 0 as amount.
  • Subtract totalExpenses from monthBudget and display the difference as the amount over the budget

6 0
2 years ago
How do most business applications and websites process credit card transactions?
klasskru [66]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

Most business applications and websites use and process the credit card for their transaction.

For example, e-commerce website such as ali baba, am a zon, accepting credit card transaction when the customer gets to purchase any product from their stores. Their transactions are processed by in house credit card apps/service. But these apps/services owned by a third party. They just give you API services and related code to integrate the credit card services.  

By using their in-house credit card apps/services, they know that user has transferred the money into their account for the purchased product, upon receiving payment confirmation, they then prepare and dispatch the order.

So, the correct answer to this question is:

To process the credit card transactions, they license third-party credit card apps/services backed by the internet merchant who is responsible for handling and managing the money of the business account.    

6 0
3 years ago
5. The shell of a document that may be used over and over in desktop publishing is called a
Blababa [14]
The answer is B) Template. 

Various templates are available in most all desktop publishing programs, from resume templates in Word to Income Statement templates in Excel. Templates are useful for skipping the general "setup" process of making a document, and allow you to focus more on filling the document with the relevant data and polishing it to your specific needs once most of the legwork is done. 
6 0
3 years ago
Read 2 more answers
Other questions:
  • Joshua is creating his résumé, in which section will he add projects and trainings he was involved in?
    10·1 answer
  • On an open book test, Anna was asked to predict how American laws may affect the Mexican way of life if the US Constitution was
    15·1 answer
  • _____ is defined as an attraction for a source based on a resemblance between the source and receiver of a message.
    15·1 answer
  • There is usually a positive side and a negative side to each technology improvement. Select a technology you use every day and c
    5·1 answer
  • Downloading files is safe for most types of files except Select one: a. documents. b. pictures. c. executable files. d. music fi
    7·1 answer
  • I’m gonna ask this again because I REALLY need an answer.
    10·2 answers
  • Fill this blanks with the given words​
    6·1 answer
  • Please anyone, help me.... I'm not sure how to put these all together.<br> 35 points!
    15·2 answers
  • Monster Collector
    7·1 answer
  • Which of the following makes Super Mario Run unique?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!