A variable in Java is declared using the following syntax:

= ;

For example:

int number = 10;
String name = “John”;

Leave a Reply

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