Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package lista;
- import java.util.Scanner;
- class Racas {
- private String raca;
- private int moral;
- private Racas proximo;
- public Racas() {
- this.raca = null;
- this.moral = 0;
- this.proximo = null;
- }
- public void inserir(String raca, int moral) {
- if (this.proximo == null) {
- this.raca = raca;
- this.moral = moral;
- this.proximo = new Racas();
- } else {
- this.proximo.inserir(raca, moral);
- }
- }
- }
- public class HuxleyCode {
- public static void main(String[] args) {
- Scanner s = new Scanner(System.in);
- String raca = "";
- int moral;
- while (!raca.equals("----------")) {
- raca = s.nextLine();
- moral = s.nextInt();
- }
- while (s.hasNext()) {
- String discurso = "";
- discurso += s.nextLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement