Why do you need to declare variables? Explain.
2 Likes
Declaring a variable tells Java how much memory it should reserve for storing the variable. Declaring a variable also helps in preventing errors as the compiler can check and flag illegal operations at compile time itself.
Answered By
3 Likes
Explain Logical operator with an example.
Explain Ternary operator with an example.
What are operators? Name the different types of operators that are used in Java.
Explain 'Arithmetical Operators' with their types.