Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a java code named DataTypeTester.java In this code Declare an integer n with initial value 1 Declare a variable amount that is initialized with

Write a java code named DataTypeTester.java

In this code

  1. Declare an integer n with initial value 1
  2. Declare a variable amount that is initialized with three times the value of n
  3. Declare a String name with you own name
  4. Declare a variable powerOfTwo to save the power of 2^n
  5. Declare a constant with name DIME_VALUE and with value 0.10
  6. Declare an integer with value 3,000,000,000. What is going to happen? Then fix it (you could refer to this QA thread on StackOverflow).
  7. Print out the String name.
  8. Prompt the user to enter two integer a and b, then calculate the square root of a^2 + b^2. Then print the formatted result to screen.
  9. Provide comments using '//' for each of the above 7 tasks.

Note that your program must fulfill all the 9 requirements to get the full points.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions

Question

1. Identify three approaches to culture.

Answered: 1 week ago

Question

2. Define communication.

Answered: 1 week ago

Question

4. Describe how cultural values influence communication.

Answered: 1 week ago