So I made a class that all it does is print(System.out.println(""))
but when I make the method I have to have a parameter ie. public static void theprinter(String a){}
.So I was wondering if there was a way to make the parameter not care what it was given instead it would give it to the System.out.println();
parameter no matter what it is given.
public class main {
public static void main(String[] args) {
printer PrinterWorkerObject = new printer();
PrinterWorkerObject.theprinter("this is the only string i can print");
}
}
public class printer {
public static void theprinter(String a){
System.out.println(a);
}
}