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

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:

  1. Create a byte with the largest byte value possible and print it out.
  2. 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.
  3. Create an int with the smallest int value possible.
  4. Print it out
  5. Create a float with the value 1.0111f.
  6. Print it out.
  7. Create a boolean that is set to false.
  8. Print it out
  9. Create a char with the value of '1'
  10. Print it out
  11. Create a string with the phrase: "I mastered Java data types!"
  12. Print it out.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sure Below is the code that performs the steps described in the activity java public class DataTypes... View full answer

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 Programming Questions!