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
I need help someone plz i need it fast ..........
photoshop1234 [79]

Answer:

Do you still need help??

Explanation:

5 0
3 years ago
Read 2 more answers
In Python Calculate the BMI of a person using the formula BMI = ( Weight in Pounds / ( ( Height in inches ) x ( Height in inches
makvit [3.9K]

Answer:

weight_pounds=float(input("Enter the weight in pounds:\n"))#taking input of weight.

height_inches=float(input("Enter the height in inches:\n"))#taking input of thye height.

bmi=(weight_pounds/(height_inches**2))*703#calculating the bmi.

print('The body mass index is '+str(bmi))#printing the result.

Ouput:-

Enter the weight in pounds:

207.8

Enter the height in inches :

72

The body mass index is 28.163395061728398

Explanation:

The above written program is in python.First I have taken input from the user of the weight in pounds then taking input of the height in inches.Then calculating the bmi and storing it in the variable bmi.Then printing the bmi in the end.

6 0
3 years ago
Write the definition of a function half which recieves a variable containing an integer as a parameter, and returns another vari
Alchen [17]

Answer:

int half(int x){

int a=x/2;

return a;

}

Explanation:

function <em>half(x)</em> which has return type <em>integer</em> and accept an <em>integer </em>type parameter <em>'x'</em> and return the an <em>integer </em>value in variable <em>'a' </em>which is closest to <em>half</em>  that of the parameter '<em>x'</em>.

5 0
3 years ago
The natural language convention used to represent ip addresses is called the:
Katyanochek1 [597]

is there multiple choice options? we need those to be exact..

6 0
3 years ago
Default tab stops are set in word every _______ inch. a. ¾ b. ½ c. 1 d. ¼
Dennis_Churaev [7]
A) 3/4 inch Meow! XD
6 0
3 years ago
Other questions:
  • 3. If the typical balance on Lucy's credit card is $750 and the interest rate (APR) on her credit card is 16%, how much in inter
    11·2 answers
  • Jeremy is typing a term paper on his computer and saves it every five minutes or so for good measure. which of the following bes
    11·1 answer
  • Find the area of the regular hexagon below by using the area formula for triangles.
    7·1 answer
  • Consider the following code: x = 17 y = 5 print (x % y) What is output?
    10·1 answer
  • High level language - An object oriented programming language​
    5·1 answer
  • ¿Que es la energía? (una sola respuesta es la correcta)
    11·1 answer
  • A plan budget time for studying and activities is referred to as?
    11·1 answer
  • ¿Cuál es la función que cumplía los sofistas y Porque eran tan importantes?​
    13·1 answer
  • Have some points part 6<br>anyone know how to change my username?​
    11·2 answers
  • Here’s my last question
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!