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
Thepotemich [5.8K]
3 years ago
14

True or False? When a floating-point value is assigned to an integer variable, the fractional part is truncated.

Social Studies
1 answer:
ivanzaharov [21]3 years ago
4 0

Answer:

The answer is "True".

Explanation:

The program to convert floating- point number into integer number can be given as follows:

Program:

public class convert //defining class convert

{

//main

public static void main(String[] aq)  //defining main method

{

float value=30.14f; //defining float variable and assign value

int score = (int)value;  //converting float to integer and store in score variable.

System.out.println("convert floating-point number into integer Number: "); //message

System.out.print(score); //print value.

}

}

Output:

convert floating-point number into integer Number:  

30

In the above java code, firstly the class convert is defined, inside this class, the main method is declared, in the method two-variable "value and score" is declared, in which variable "value" is float variable, that holds a value, that is "30.14f".

In the next line, an integer variable score is defined, which uses type casting to convert float number into integer number, and in the next step, the print function is used, that print score variable value.

You might be interested in
when your phone alerts you that you received a text you check the message. when your phone doesn't sound an alert you check it m
Sloan [31]

The correct answer to this open question is the following.

Although there are no options attached, we can say the following,

When your phone alerts you that you received a text you check the message. When your phone doesn't sound an alert you check it much less frequently. The difference in your behavior from one situation to another is most likely due to awareness, conditioning, and the reaction to an external stimulus.

The external stimulus is of course the ringing or the sound alert. This makes people immediately check what the alert is about. In today's modern world, people are conditioned to react to a stimulus; the alarm sound. That is why, in the presence of the stimulus, they conditionally react and check their phones.

When there is no stimulus, the mind does not operate in a conditioned way and people less frequently react as in the presence of the stimulus.

3 0
3 years ago
Since the president's duty is to carry out laws passed by Congress, he is known as the:
slava [35]

Answer:

Chief Executive

Explanation:

Executive branch carries out laws.

3 0
3 years ago
Read 2 more answers
Which of the following states that employees should not be discriminated based on physical or mental status: Americans with Disa
Assoli18 [71]

Answer:

Americans with Disability Act: This act states that employees must not be discriminated on the basis of their physical appearances or any disabilities.The government gave rise to this law so that people with disabilities must not be discriminated in terms of making use of the facilities such as public forums, transportation and etc.

It is to make sure that people with disabilities receive equal opportunities and resources. It also gives civil rights to people regardless of their caste, color or creed.

6 0
3 years ago
The earth Direct Rotation is call us
sp2606 [1]
The earth Direct Rotation is called retrograde. 
7 0
4 years ago
Read 2 more answers
Which prophet in the Bible preached about trust and true worship?​
Crank

Answer:

Jeremiah

Explanation:

he preached about trust and worship

8 0
3 years ago
Other questions:
  • What type of responsibility obliges a soldier to exercise reasonable and prudent actions to properly use, care for, and safeguar
    5·1 answer
  • Because of culture early humans could
    5·2 answers
  • Children may misbehave in order to get the attention that is associated with being punished. In this example, the attention serv
    14·1 answer
  • Daniel teaches sixth grade at a local elementary school. he significantly increased his salary by earning a master's degree in e
    7·1 answer
  • What is the slope for (2,5) and (-3,7)
    8·1 answer
  • After the legislature passes a law, what is the role of the president? The president must enforce those laws. The president can
    13·1 answer
  • Which of the following is an accurate statement about agendas? Group of answer choices Approximate the time allocation for each
    10·1 answer
  • Why is it important for rights to be guaranteed during wartime in the United States, especially during a war that is promoted as
    11·1 answer
  • Please Help!!!!!!! This question is due today at 10pm<br> How does Kylie Jenner use leadership?
    5·1 answer
  • In allport's theory about what kinds of contact would reduce hostility between two groups, what is the role of cooperation or co
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!