Preview only show first 10 pages with watermark. For full document please download

Java Codelab Solutions_ Section 2.2.3

Documents Similar To Java Codelab Solutions_ Section 2.2.3. Skip carousel. carousel previouscarousel next. Java Codelab Solutions_ Section 2.6 · Java Codelab Solutions_ Section 2.1 Java Application Structure · Codelab Turingscraft Ch 8 Ch9 Ch10 Answers · My Programming Lab Chapter 4 ...

   EMBED

  • Rating

  • Date

    October 2017
  • Size

    68.2KB
  • Views

    7,739
  • Categories


Share

Transcript

Section 2.2.3 Floating­Point Data Types 20541:  Declare a float variable named price.             float price; 20542:  Declare a double variable named netWeight.             double netWeight; 20511:  Declare a variable x, suitable for storing values like 3.14159 and 6.02E23.             float x; 20980:  Write a single statement that will print the message “first is “ followed by the value of first, and then a space, followed by “second = “, followed by the value of second.  Print everything on one line and go to a new line after printing.  Assume that first has already been declared as a double and that second has been declared as an int.  Assume also that the variables have already been given values.              System.out.println("first is " + first + " second = " + second + "\n");