Answered step by step
Verified Expert Solution
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
- Declare an integer n with initial value 1
- Declare a variable amount that is initialized with three times the value of n
- Declare a String name with you own name
- Declare a variable powerOfTwo to save the power of 2^n
- Declare a constant with name DIME_VALUE and with value 0.10
- 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).
- Print out the String name.
- 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.
- 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started