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
anzhelika [568]
3 years ago
7

Write convert() method to cast double to int

Computers and Technology
1 answer:
Oksanka [162]3 years ago
3 0

Answer:

Explanation:

The code provided is written in Java. The statement is provided right under the /*Type your code here*/. In Java, in order to case one primitive to another you simply need to type the primitive type that you are trying to cast too before the variable and within parenthesis. The output of the new code can be seen in the attached image below.

class LabProgram {

   public static int convert(double d){

   /* Type your code here */

      return (int) d;

}

public static void main(String[] args) {

System.out.println(convert(19.9));

System.out.println(convert(3.1));

}

}

You might be interested in
As marketing manager, you need to have ( blank) skills and (blank) skills.
andrew-mc [135]

Answer:

Leadership skills

Technical skills

Organizational skills

Communication skills

Creative skills

Explanation:

8 0
3 years ago
How many types of string types does python support?​
Andru [333]

Answer:

47

Explanation:

they support all of them,more their babies and offspring

7 0
3 years ago
How does speech recognition software know what you are saying?
boyakko [2]
It converts the mic input into a string of raw data, then compares it to hundreds, even thousands of voice samples. The output is a polished string of data in words.
8 0
3 years ago
A custom information feel that helps users find a specific document is called
vichka [17]
A custom information feel that "HELPS USERS FIND A SPECIFIC DOCUMENT"... is what I got out of that sentence.

ANSWER: Search Box?
8 0
3 years ago
A _____ is a collection of (potentially) thousands of computers that can respond to requests over a network
Rom4ik [11]

Answer:

server or supercomputer

Explanation:

5 0
2 years ago
Other questions:
  • Write the HTML to create a hyperlink to the named fragment designated by “top”.
    10·1 answer
  • A program called the ______ combines the object program with other programs in the library and is used in the program to create
    5·1 answer
  • Employees don't have to comply with PPE requirements if they feel the PPE isn't necessary for the particular task they performed
    14·2 answers
  • Pop3 allows users to fetch and download e-mails from a remote mailbox. does this mean that the internal format of the mailboxes
    14·1 answer
  • Which term is used to define the wires on a motherboard that move data from one part of a computer to another?
    13·1 answer
  • Text and graphics that have been out of copied are stored in area called the _____
    15·2 answers
  • 2. What is software conflict?<br>​
    11·1 answer
  • Why should the Six-Step Process be considered as an iterative process?
    8·1 answer
  • What is the full form of 'Rom<br>​
    7·2 answers
  • How to make your nest learning thermostat stop doing something
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!