0% found this document useful (0 votes)
0 views1 page

Assignment - Variables

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views1 page

Assignment - Variables

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment

1. What are the rules for naming a variable in Java?


2. What is the syntax for declaring a variable in Java?
3. Can you use reserved keywords as variable names in Java? Why or why not?
4. What are the data types available for variable declaration in Java?
5. What is the difference between declaring and initializing a variable in Java?
6. Can variable names in Java contain special characters like @ or $?
7. Why is it necessary to initialize local variables before using them in Java?
8. Can you declare a variable without assigning it a value in Java?
9. Are Java variable names case-sensitive? Provide an example.
10. Is it possible to change the type of a variable after it has been declared? Why or why not?

You might also like