if i use the @neilcsmith example the problem still exists as i said
i fix the code like this:
void displayinformation(){
if (selection.equals("1")) {
Information("John", 30);
}
if (selection.equals("2")) {
Information("Melanie", 40,);
}
}
String information (String name, int age) {
textSize(60);
fill(0);
text("Name:"+name, 800,500);
fill(0);
text("Age:"+age, 850, 600);
return "Name: " + name + "\nAge: " + age;
}
}