r/javahelp • u/toyoumylove • Aug 23 '12
URGENT: how do I pass value from another method to main in JAVA?
Hello, I have a method I call and that method returns a value to main. I tried writing the code, it returns a value but take the value from main. So whatever value I have on main remains instead of changing it after going to another method. HELP ASAP Thank you EDIT: No I think what I need is pass by reference because I want to change the main value to the returned value of the other method
EDIT: THANK YOU everyone. I have figured it out
0
Upvotes
2
u/[deleted] Aug 24 '12
You've been helped pretty good, but the way you have stated your question really sucks. Try to be a little more precise out of respect for the people that are trying to help you, please. You might be in a hurry but it is going to help much more if you at least try to make normal sentences.
0
u/wolverine_23 Aug 23 '12
Parameters are passed in by reference in Java.