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
alex41 [277]
3 years ago
14

Give the type and value of each result of the following Java expressions.

Computers and Technology
1 answer:
atroni [7]3 years ago
3 0
Give the type and value of each result of the following Java expressions. a. (5 / 2) * 2.0  type is float value is 4.0 b. (5/2.0) * 2 type is integer value is 5c. "1.3" + "5.2" type is string value is 1.35.2d. 1 + 7.0 + "2" + "x"  this will produce an error because we cannot add variables of different type
You might be interested in
Write a application that can determine if a 5 digit number you input is a palindrome. If the number is a palindrome then print "
notsponge [240]

Answer:

Written in Python:

num = int(input("Number: "))

strnum = str(num)

if len(strnum) !=5:

    print("Length must be 5")

else:

    if(strnum[::-1] == strnum):

         print("The number is a palindrome.")

    else:

         print("The number is NOT palindrome.")

Explanation:

This prompts user for input

num = int(input("Number: "))

This converts user input to string

strnum = str(num)

This checks the length of the string

if len(strnum) !=5:

    print("Length must be 5") If length is not 5, this prompt is printed

else:If otherwise

    if(strnum[::-1] == strnum): The compares the string reversed with the original

         print("The number is a palindrome.") If both are the same, this line is executed

    else:

         print("The number is NOT palindrome.") If otherwise, this line is executed

4 0
3 years ago
Convert the following decimal number to its equivalent binary ,octal,hexadecimal 1920​
Serhud [2]

Answer:

0b11110000000 is binary

0o3600 is in octal

0x780 in hexa dec.

Explanation:its a bit complitcated to explain sorry bro!

3 0
4 years ago
Can somebody help me?
vlabodo [156]
I believe the answer is B. Optimization because it means to make work more efficient but I might be wrong. Checking definitions, this one seems more logical. 
3 0
3 years ago
Select all the correct answers.
oksano4ka [1.4K]

Explanation: 2 and 5

3 0
3 years ago
Read 2 more answers
Helpppp plsssss!!!<br><br>thanks.
sattari [20]
I believe the answer is A
6 0
3 years ago
Other questions:
  • All of the following are examples of a web application except for ______.
    12·2 answers
  • 4. Scientists are not concerned with the human impact on the environment. True or False?
    6·2 answers
  • The World Wide Web (WWW) is a network of links on the Internet to documents containing text, graphics, video, and sound, but doe
    10·1 answer
  • 4. How can you select non-adjacent cells (i.e. cells that are not all together in one block)?
    5·2 answers
  • What is an example of how pseudo - randomness is used to creative variation​
    5·1 answer
  • A network consists of 10 computers, all running windows 7 professional. one computer acts as a file server and serves up data to
    6·1 answer
  • Columns are labeled with letters and Rows are labeled with numbers.
    5·1 answer
  • The master production schedule for Product A shows a need for 30 units, and Product B shows a need of 25 units. To manufacture a
    12·1 answer
  • Connect 5 LEDs with any random colors. Iteratively, turn ON 1 to 5 LED(s) that will take 5 iterations in total, and in every ite
    6·1 answer
  • Which similar computer network components connect multiple devices?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!