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
What are the major source of foreign country?​
Radda [10]

Answer:

Going from one country to another country for job and to earn money is called foreign employment. Foreign employment uplifts the life standard of the people and has become an important source of earning foreign currency. Foreign employment reduces the unemployment problem of a country.

3 0
2 years ago
What cultural diffusion is this cat yoga was introduced in the United States over the last few years
JulsSmile [24]

it sucks that you dont know

Explanation:

too bad

5 0
2 years ago
Want was one of the effects of the Emancipation Proclamation?
Aloiza [94]

Answer:

B. Freed slaves could fight in the Union Army against the Confederacy

Explanation:

6 0
2 years ago
Mass or congregational worship is normally organised in the house. True or False​
diamong [38]

Answer:False

Explanation:Congregation is a group of peopleor a huge population and a mass need a priest and some people so it can't be organised in a person's house or just a normal house.It will need a place bigger than just a house.

6 0
3 years ago
Garner is conducting a study on how students who live on campus eat. He asked participants to record where they ate each of thei
igor_vitrenko [27]

Answer:

The Hawthorne Effect

Explanation:

The Hawthorne effect (also referred to as the observer effect) explains that individuals modify an aspect of their behavior in response to their knowledge of being observed. In this study students changed their eating place during the observation period.

6 0
2 years ago
Other questions:
  • How does the influence of key presidential aides affect the checks and balances established by the Constitution?
    7·1 answer
  • The reformers of the Anglican Church came to be called
    12·1 answer
  • A police officer arrested a motorist for not wearing a seatbelt, a violation of the law of the state as well as a violation of a
    6·1 answer
  • Gretchen found herself buying and wearing clothes from a boutique that her friends frequented even though she really did not lik
    7·1 answer
  • Why did some of the framers want a bill of rights
    5·1 answer
  • Theodora panel reflects stylistic continuity and exchange between the early christian and byzantine cultures because
    7·1 answer
  • Why do companies lower product prices and offer free samples? A. to find out what people want in a product B. to increase brand
    7·1 answer
  • The constitutions of the states were
    5·1 answer
  • Though it was Spain who funded his famous trip to the Americas, Christopher Columbus was born in Italy.
    13·1 answer
  • Explain five goals for the open air movie night (What do you hope to achieve with this event?)​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!