I've been trying to declare multiple strings as parameters to a method without specifying their type for every parameter, however I've not been successful.
What I've got:
private void Fields(String sName, String sSurname, String sMessage) {
teName.setText(sName);
teSurname.setText(sSurname);
teMessage.setText(sMessage);
}
What I want:
private void Fields(String sName, sSurname, sMessage) {
teName.setText(sName);
teSurname.setText(sSurname);
teMessage.setText(sMessage);
}
Of course the second example doesn't work, but it's just to give you an idea of what I mean to do.
Is there a shorter way of doing this?