What is the use of Variables in Java?

1. What are variables in Java primarily used for?

a) Controlling the flow of the program
b) Storing data values
c) Generating random numbers
d) Handling user inputs

Answer:

b) Storing data values

Explanation:

Variables in Java are containers for storing data values, allowing the program to manipulate or access these values.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top