Answer the question
In order to leave comments, you need to log in
How to get a variable from another method of the same class?
How to get a variable from another method of the same class?
public class Main {
private void a() {
int number = 5;
}
private void b() {
How to read number variable?
return do not suggest it is already taken and cannot be changed
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question