Using a variable in another method in another class — how?

Simply put, you can’t. Method-local variables only exist during the execution of the method. They can’t be accessed outside of the method at all.

Browse More Popular Posts

Leave a Comment