Challenge: Declaring Variables

In this lesson, we will do a short coding exercise to test the understanding of data types and creating variables in Java

We'll cover the following

Problem statement

  • Declare an int type variable, name it int_number and assign it a value of 1000.

  • Declare a float type variable, name it float_number and assign it a value of 10.292.

  • Declare a double type variable, name it double_number and assign it a value of 0.00000000000512365123.

  • Declare a char type variable, name it char_name and assign it a value of N.

  • Declare a boolean type variable, name it bool_accept and assign it a value of true.

Get hands-on with 1400+ tech skills courses.