• 15 hours
  • Easy

Free online content available in this course.

course.header.alt.is_video

course.header.alt.is_certifying

Got it!

Last updated on 3/28/24

Check what you've learned about data and data types in Java

Evaluated skills

  • Identify how to use data and data types in Java
  • Question 1

    What components define a variable in programming?

    • Label, content, type

    • Description, value, storage

    • Name, value, type

    • Purpose, type, label

  • Question 2

    Select the true statements about variables and constants.

    Careful, there are several correct answers.
    • Constants are variables that cannot be assigned a value from a variable or another constant. For example, the following example is not possible:

      int count = 10;
      final int steps = count;
      
    • Constants are variables that can't change their initial values. For example, the following example is not possible:

      final int count = 10;
      count += 12;
      
    • Using constants is encouraged in order to prevent an accidental change of value.

    • Using constants is restrictive since they can't change. They should be avoided.

  • Question 3

    Select the following code snippets:

    • The snippet that declares a whole number that can change.
    • The code snippet for a string that cannot change. 
    Careful, there are several correct answers.
    • int steps;
      steps = 11;
      
    • final String title = "Programming is art!";
      
    • final int steps = 11;
      
    • String title = "Programming is art!";
      title = "I love learning!";
      
Ever considered an OpenClassrooms diploma?
  • Up to 100% of your training program funded
  • Flexible start date
  • Career-focused projects
  • Individual mentoring
Find the training program and funding option that suits you best