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
Explain how life in cites improved in the late 1800s and early 1900s. Be sure to describe innovations in public transportation a
AlladinOne [14]
Good Morning! 
 
There were several transformations in the transition from the 19th to the 20th centuries. These included advances in medicine, architecture and basic sanitation, which ensured that quality of life not only improved but was maintained. All this adds up to the rise of the fastest and most efficient means of transport, which has allowed longer distances to be covered in less time. 
 
Hugs!
5 0
3 years ago
Gay men are ________ likely to have been smothered by maternal love than heterosexual men. Boys growing up in a father-absent ho
zaharov [31]
The answers are both no more
5 0
3 years ago
Please help i’ll give brainliest
Effectus [21]

Answer:

B

Explanation:

8 0
3 years ago
Goffman’s concept – Total Institutions – are places such as prisons that separate the person from society. This leads to the soc
Dafna1 [17]

Answer: Mortification of Self

Explanation:

Mortification to self or self mortification is the practice in which inmate is punished degraded or humiliated so that they can be segregated from their individual personality. They have to undergo such treatments when the inmate is in patient phase.

This process is carried so that identity of the person can be displayed through institution's nature and has no trace of society otr any other factor according to the theory of Goffman.  

5 0
3 years ago
Which lines from Natalie Merchant's song "Wonder" most likely inspired R. J. Palacio to make August's character stared at wherev
eduard

Answer:

D................................

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • A child who is ignored but not shunned by his or her peers is considered a(n): invisible-rejected child. withdrawn-rejected chil
    5·1 answer
  • The coolest temperate marine climates are found where ?
    12·1 answer
  • Land, Labor and Entrepreneurship are all of the factors of production.
    14·1 answer
  • Kenzie is a 3-year-old who has not yet began talking. she also has difficulty interacting with other children as well as with gr
    14·1 answer
  • Which stage in the policy-making process is government recognition that a problem is worthy of consideration for governmental ac
    10·1 answer
  • The great lakes are​
    6·2 answers
  • An example of a shared power is to
    8·2 answers
  • Can you please help i will give brainiest
    14·1 answer
  • Which city passed a strong law to reduce air pollution after a deadly smog event in the 1950s?
    15·1 answer
  • In the united states, the amish would be an example of a:_____.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!