Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Change non-void method's parameters.

$
0
0
What is the best way to change a non-void method's parameters WITHOUT instancing a new one..
For example

class ReadStdout{

    public ReadStdout(Process p, JTextArea c){
           (....)
    }
}


then on the main constructor
ReadStdout read = new ReadStdout(process, console);

and then when a method is called, in a button listener perhaps, ReadStdout() should have new parameters.

I was thinking something like,
read.ReadStdout(newprocess, newconsole);

But doesn't work..

Any help would greatly appreciated.
Thank you.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>