fork download
  1. package com.company;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.List;
  5. import java.util.Scanner;
  6.  
  7. public class Main {
  8.  
  9.  
  10. class Vertice {
  11. int atual;
  12. boolean visitado;
  13. List<Aresta> arestas;//lista de arestas dentro do vertice
  14.  
  15. Vertice(int atual, boolean visitado) {
  16. this.atual = atual;
  17. this.visitado = visitado;
  18. }
  19.  
  20. void addAdjacente(Aresta novaAresta) {
  21. arestas.add(novaAresta);
  22. }
  23.  
  24. int getAtual() {
  25. return atual;
  26. }
  27.  
  28. void setVisitado() {
  29. this.visitado = true;
  30. }
  31. }
  32.  
  33.  
  34. class Aresta {
  35. Vertice origem;
  36. Vertice destino;
  37. int tipo;
  38.  
  39. Aresta(Vertice origem, Vertice destino, int tipo) {
  40. this.origem = origem;
  41. this.destino = destino;
  42. this.tipo = tipo;
  43. }
  44. }
  45.  
  46. public static void main(String[] args) {
  47. // Grafo g = new Grafo();
  48. //Scanner sc = new Scanner(System.in);
  49. System.out.println("AA");
  50. List<Vertice> vertices;
  51. vertices = new ArrayList<>();//construtor incia a lista de vertices
  52.  
  53.  
  54. }
  55. }
  56.  
  57.  
Runtime error #stdin #stdout #stderr 0.08s 33936KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Error: Could not find or load main class Main
Caused by: java.lang.NoClassDefFoundError: com/company/Main (wrong name: Main)