Inicio XML

This commit is contained in:
2023-05-23 00:36:51 +02:00
parent 6b15dde8dd
commit 84a6b95e1b
2 changed files with 6 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ public class App {
Manager manager = new Manager();
do {
System.out.println("=======================");
System.out.println("Agenda de contactos TXT");
System.out.println("Agenda de contactos XML");
System.out.println("=======================");
System.out.println("1. Nuevo contacto");
System.out.println("2. Buscar por nombre");

View File

@@ -1,5 +1,10 @@
package agenda;
import java.xml.bind.annotation.*;
@XmlRootElement(name = "persona")
@XmlType(propOrder = { "nombre", "telefono" })
@XmlAccessorType(XmlAccessType.FIELD)
public class Persona implements Comparable {
private String nombre;
private String telefono;