
Como ordenar String en Java
Publicado por Charly (4 intervenciones) el 26/07/2021 20:48:00
Hola, tengo el siguiente código, me podéis ayudar a ordenar la salidas?
Os agradeceré.
public String infoCompeticionMangos() {
String hilera;
hilera = this.getCedula() + " - " + this.getEdad() + " - " + this.getCategoria() + " - " + this.getEquipo() + " - " + this.getTiempoMangos() + "\n";
return hilera;
}
public String infoCompeticionHato() {
String hilera;
hilera = this.getCedula() + " - " + this.getEdad() + " - " + this.getCategoria() + " - " + this.getEquipo() + " - " + this.getTiempoHato() + "\n";
return hilera;
}
public String infoCompeticionChuchecas() {
String hilera;
hilera = this.getCedula() + " - " + this.getEdad() + " - " + this.getCategoria() + " - " + this.getEquipo() + " - " + this.getTiempoChuchecas() + "\n";
return hilera;
}
public String infoCompeticionGanaderos() {
String hilera;
hilera = this.getCedula() + " - " + this.getEdad() + " - " + this.getCategoria() + " - " + this.getEquipo() + " - " + this.getTiempoGanaderos() + "\n";
return hilera;
}
public String infoCompeticionPampa() {
String hilera;
hilera = this.getCedula() + " - " + this.getEdad() + " - " + this.getCategoria() + " - " + this.getEquipo() + " - " + this.getTiempoPampa() + "\n";
return hilera;
}
//Ordenar por tiempo el campo tiempo en cada caso.
public int Ordenar(){
}
Os agradeceré.
public String infoCompeticionMangos() {
String hilera;
hilera = this.getCedula() + " - " + this.getEdad() + " - " + this.getCategoria() + " - " + this.getEquipo() + " - " + this.getTiempoMangos() + "\n";
return hilera;
}
public String infoCompeticionHato() {
String hilera;
hilera = this.getCedula() + " - " + this.getEdad() + " - " + this.getCategoria() + " - " + this.getEquipo() + " - " + this.getTiempoHato() + "\n";
return hilera;
}
public String infoCompeticionChuchecas() {
String hilera;
hilera = this.getCedula() + " - " + this.getEdad() + " - " + this.getCategoria() + " - " + this.getEquipo() + " - " + this.getTiempoChuchecas() + "\n";
return hilera;
}
public String infoCompeticionGanaderos() {
String hilera;
hilera = this.getCedula() + " - " + this.getEdad() + " - " + this.getCategoria() + " - " + this.getEquipo() + " - " + this.getTiempoGanaderos() + "\n";
return hilera;
}
public String infoCompeticionPampa() {
String hilera;
hilera = this.getCedula() + " - " + this.getEdad() + " - " + this.getCategoria() + " - " + this.getEquipo() + " - " + this.getTiempoPampa() + "\n";
return hilera;
}
//Ordenar por tiempo el campo tiempo en cada caso.
public int Ordenar(){
}
Valora esta pregunta


0