0
How do i use temp variable?
3 ответов
+ 6
int i = 14; // some variable
int temp = i;
// A variable used only to store something for a short period of time
The question is sort of to vague, you use the temp variable the same way you use a variable. Depends on what it's purpose is in the program.
+ 3
int i, j, k; <<declared i,j,k to a data type int
i = 2; <<initialized one of the declared variables
System.out.println(i);
+ 1
declare a variable,
name it temp (or anything else)