Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!