+ 3
How to declare variable in java?
2 Answers
+ 16
The first variable is of type int . A value is established in a separate Javastatement. The second variable is of type String and is declared with an initial value. Open a command prompt and navigate to the directory containing your new Java program.
Eg:-)
int i=10;
float f=53.5;
https://www.sololearn.com/learn/Java/2139/?ref=app
+ 6
int - stores whole number
String- stores sentences
char- stores characters
double- stores decimal numbers