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
dsp73
2 years ago
14

Which of the following variable declarations is a correct assignment?

Computers and Technology
1 answer:
Gwar [14]2 years ago
6 0

Answer:

Option D: double y = 82;

Explanation:

In Java programming, it is acceptable to assign an integer (lower type) to a double type (higher type) variable. By assigning an integer to double type variable using the "=" operator, the integer will be converted to double type implicitly. It is known as the implicit type casting.  

For example, <em>double y = 82</em> will convert integer 82 (integer) to 82.0 (double).

You might be interested in
Write a program. Commence the change to be dispensed from a vending machine. An item machine can cost between $0.25 send a dolla
SSSSS [86.1K]

Answer:

Explanation:

The objective of this question is to write a java program for a vending machine.

/* This program finds out what amount the vending machine is going to dispense. A given item in the machine can cost between $0.25 and a dollar in five-cent increments (25, 30, 35, 40...90, 95 or 100), and the machine accepts only a dollar bill to pay for the item. */

// Compile: javac PP10. java

// Run: java PP10

// imported the scanner class from util package.

import java. util. Scanner;

//class declaration

public class PP10 {

// main method is defined here.

       public static void main(String[]   args)

          {

// declaration of the variables.

             Scanner keyboard=new Scanner (System.in):

//taking the string type input

              int nl, amount, n2, n3, n4, n5;

            System.out.println("Enter price of item (from 20

cents to a dollar, in 5-cents) :");

             n1=keyboard. nextInt ();

            System.out.println("You bought an item for "+n1+"

cents and gave me a dollar");

            System.out.println ("so your change is ");

//the amount is first calculated.

          amount=100-n1;

// quarter value is calculated

            n2=amount/25;

// rest amount is get here.

            amount=amount%25;

// dime value is calculated

             n3-amount/10;

// rest amount is calculated

            amount=amount%10;

// value of nickel is calculated here

            n4=amount/5;

// rest amount is calculated

            amount=amount%5;

//at last the number of pennies is get

            n5=amount;

// Display output

              System. out . println(n2+" quarters") :

              System. out . println(n3+" dimes") ;

              System. out . println(n4+" nickels") ;

              System. out . println(n5+" pennies") ;

       }

  }

Output:

Enter the price of the item (from 20 cents to a dollar, in 5 - cents):

So, you bought an item for $0.45 and gave me one dollar; thus, your change is

2 quarters

0 dimes

1 nickel

0 pennies

4 0
3 years ago
All of the following are ways to limit what is tracked about you online, except:
Veseljchak [2.6K]

Answer:b

Explanation: turning off your screen does nothing on the cyber side and people and companies can still access your internet history even while your screen is off

5 0
3 years ago
Plato :
ddd [48]

Answer:

filler content

Explanation:

Isabel must use some sort of filler content while creating a wireframe that she is up with. For the banner, she can make use of the placeholder, and for the text, she can make use of the lorem ipsum. Also, if the wireframe is low fidelity then only she can use above. And if the wireframe is high fidelity then she should use the original banner and text.

3 0
3 years ago
Read 2 more answers
____ is the encapsulation of method details within a class.
Anestetic [448]

Implementation hiding i<u>s the encapsulation of method details within a class</u>. Implementation can be interpreted as those specifications which can be altered without altering the correctness of an application. Wrapping data/methods within classes (descriptions of the way all objects of this type will look/act) in combination with implementation hiding is called encapsulation. Information users need to know about behaviors should be available without dependence on implementation specifications.

6 0
3 years ago
BOTH QUESTIONS ONLY FILL IN C++ CODEWrite a copy constructor for CarCounter that assigns origCarCounter.carCount to the construc
Alborosie

Answer:

im lost tell me a question then ill answer

Explanation:

4 0
3 years ago
Other questions:
  • True False The explicit location always tells you where users are located when they type the query.
    10·2 answers
  • You would like to set up an online meeting to communicate with colleagues on a group project. Which of these tools should you su
    9·1 answer
  • You created a vm and installed windows server 2008 r2 over the network, using pxe boot. when you start the vm, it doesn't attemp
    7·1 answer
  • The True Confessions of Charlotte Doyle begins with what is called a(n) _____.
    15·1 answer
  • The chemical symbol H represents which of the following elements?
    9·2 answers
  • Who has gotten a random file link from someone? What file does it contain?
    8·2 answers
  • A network administrator determines who may access network resources by assigning users
    10·1 answer
  • Determine what is printed by the following code.
    8·1 answer
  • Bryan's company is new and has limited funds to work with. He has been tasked with finding a telecommunications technology that
    7·1 answer
  • _____ allows a function or operator to perform different tasks depending on the types of the arguments or operands. Group of ans
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!