Instructions Description: This activity will help familiarize yourself with the Java data types including Strings, ints, floats
Fantastic news! We've Found the answer you've been seeking!
Question:
Instructions Description:
This activity will help familiarize yourself with the Java data types including Strings, ints, floats and more. Please follow the steps below:
There is an image of primitive datatypes with ranges in the activity. Take a look so you know what the largest and smallest range values are.
Steps:
- Create a byte with the largest byte value possible and print it out.
- Try making a byte with a value greater than 127 or less than -128. Print it out and see what happens! Remove this byte for the test.
- Create an int with the smallest int value possible.
- Print it out
- Create a float with the value 1.0111f.
- Print it out.
- Create a boolean that is set to false.
- Print it out
- Create a char with the value of '1'
- Print it out
- Create a string with the phrase: "I mastered Java data types!"
- Print it out.
Related Book For
Auditing and Assurance services an integrated approach
ISBN: 978-0132575959
14th Edition
Authors: Alvin a. arens, Randal j. elder, Mark s. Beasley
Posted Date: