Yes, I do suck. I can't get your example to compile.
public class test {
public static void main (String[] args) {
char a = ' ';
int b = 1;
CI ci = sub (a, b);
System.out.print (ci.a + " " + ci.b);
}
class CI {
char c;
int i;
new CI...
How do I pass multiple parameters back and forth between main and subroutine? Say I have the following program.
public class test {
public static void main(String[] args) {
char a=' ';
int b=1;
sub(a,b);
System.out.print(a +" " +b);
}
static void sub(char a,int b) {
a='h'...
Output to file is easy. What I'm trying to do is output to the end of the file so that nothing that was already in the file is lost. Say I have a hypothetical file a.txt. Everytime I run my program, I want it to output certain info to a.txt at the end of the file for record keeping. How do I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.