Impressão de arquivos

Preciso imprimir um arquivo usando o System.out.println(<D:\Dados Meus Documentos\PUCMINAS\GRAFOS\editorgrafos\exemplo\entrada1>). O que estou fazendo de errado.

import java.util.*;
import java.io.File;

public class Grafo {

private final int NULO = 0;
private final int BRANCO = 0;
private final int PRETO  =  1;

private int numVertice;
private int numAresta;

private int matriz[][];

//--------------------------------------------------------------------
// Construtor
public Grafo ()
{
	numVertice = numAresta = 0;	
}

public int getNumVertice()
{
return numVertice;
}

public int getNumAresta()
{
return numAresta;
}

//--------------------------------------------------------------------
// lerGrafo: Realiza a leitura do grafo no arquivo.
public boolean lerGrafo(String arquivo)
{
	boolean resp = true;
	Scanner arq;

	System.out.print("Abrindo arquivo " + arquivo + " ... ");

	try
	{
	   arq = new Scanner(new File(arquivo));

		System.out.println("OK");
		
		numVertice = arq.nextInt();

		matriz = new int [numVertice][numVertice];

	excluirTodasArestas();

		for(int i = 0; i < numVertice; i++)
		{
			for(int j = i+1; j < numVertice; j++)
			{	
				inserirAresta(i, j, arq.nextInt());
			}
		}
		arq.close();
	} 
	catch (Exception e) 
	{
		resp = false;
		System.out.println("NOP");
	}

	return resp;
}

//--------------------------------------------------------------------
// inserirAresta: Insere uma nova aresta.

public void inserirAresta(int v1, int v2, int peso)
{
if(v1 >= numVertice){
System.out.print(“ERRO: Vertice " + v1 + " nao existe no grafico”);
}

	if(v2 >= numVertice){
		System.out.print("ERRO: Vertice " + v2 + " nao existe no grafico");
	}

	if(matriz[v1][v2] == NULO && peso != NULO){
		matriz[v1][v2] = matriz[v2][v1] = peso;
		numAresta++;
	}      
}

//--------------------------------------------------------------------
// isAresta: Retorna true se existe a aresta.

public boolean isAresta(int v1, int v2)
{
return (matriz[v1][v2] != NULO);
}

//--------------------------------------------------------------------
// getAresta: Retorna o peso da aresta.

public int getAresta(int v1, int v2)
{
return matriz[v1][v2];
}

//--------------------------------------------------------------------
// excluirAresta: Exclui uma aresta.

public void excluirAresta(int v1, int v2)
{
if(v1 >= numVertice){
System.out.print(“ERRO: Vertice " + v1 + " nao existe no grafico”);
}

	if(v2 >= numVertice){
		System.out.print("ERRO: Vertice " + v2 + " nao existe no grafico");
	}

	if(matriz[v1][v2] != NULO){
		matriz[v1][v2] = matriz[v2][v1] = NULO;
		numAresta--;
	}      
}

//--------------------------------------------------------------------
// excluirTodasArestas: Exclui todas as arestas.

public void excluirTodasArestas()
{
for(int i = 0; i < numVertice; i++){
for(int j = i; j < numVertice; j++){
matriz[i][j] = matriz[j][i] = NULO;
}
}
}

public void imprimir()
{
	int i = 0, j = 0;

	System.out.print("\n");
	for(i = 0; i < numVertice; i++){
		if (i >= 100){
			System.out.print("\t(" + i + ") ");
		}else if(i >= 10){
			System.out.print("\t(0" + i + ") ");
		}else{
			System.out.print("\t(00" + i + ") ");
		}
	}

	for(i = 0; i < numVertice; i++){

		if (i >= 100){
			System.out.print("\n(" + i + ") ");
		}else if(i >= 10){
			System.out.print("\n(0" + i + ") ");
		}else{
			System.out.print("\n(00" + i + ") ");
		}

		for(j = 0; j < numVertice; j++){
			if(matriz[i][j] == NULO){
				System.out.print("\t. ");
			}else{
				System.out.print("\t" + matriz[i][j] + " ");
			}
		}
	}

	System.out.println();
}

}

/***********************************************************************

  • Pontificia Universidade Catolica de Minas Gerais
  • Sistemas de Informacao
  • Grafos e Algoritmos computacionais
  • Prof. Max do Val Machado
  • Editor de Grafos - v0
    ************************************************************************/

import java.util.;
import java.io.
;

public class Principal {

private static Grafo g = new Grafo();

private static void clrscr()
{
	for(int i = 0; i < 20; i++){
		System.out.println("\n");
	}
}

private static void pause (String msg)
{
	try{
		System.out.println(msg);
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		in.readLine();
	}catch (IOException e){
	}
	//Scanner sc = new Scanner (System.in);
	//sc.next();
}


private static void delay(int tempoMilisegundo){
	try{
		Thread.sleep(tempoMilisegundo);
	}catch (Exception e){
	}
}


private static char readChar()
{
	Scanner sc = new Scanner (System.in);
	return sc.next().charAt(0);
}


private static void menu()
{
	char opcao;
	
	do{
		clrscr();

		System.out.println("================================");
		System.out.println("EDITOR DE GRAFOS - v0 - PUC MINAS");
		System.out.println("================================");
		System.out.println("\n\n\n");

		System.out.println("(I)mprimir Grafo");
		System.out.println("(S)air");

		opcao = readChar();

		opcao = (opcao >= 'a' && opcao <= 'z')?(char)(opcao-32):opcao;

		switch (opcao){
			case 'I':
				for(int i = 0; i < 10; i++){
					delay(60);
					System.out.printf(".");
				}
				clrscr();
				System.out.println("\n\n");
				g.imprimir();
				pause("Aperte ENTER para CONTINUAR...");
				break;

			case 'S':
				System.out.println("Fim de programa!");
				break;

			default:
				System.out.println("Desculpa opcao invalida!!!");
				pause("Aperte ENTER para CONTINUAR...");
		}

	}while(opcao != 'S');
}

public static void main (String [] args)
{
	clrscr();

	g = new Grafo();

	//Validar o numero de parametros
	if(args.length != 1){
		System.out.println(<D:\\Dados Meus Documentos\\PUCMINAS\\GRAFOS\\editorgrafos\\exemplo\\entrada1>);
	
	//Verificar se eh possivel ler o grafo passado como parametro
	}else if(g.lerGrafo(args[0]) == false){
		System.out.println("ERRO Leitura: Nao eh possivel ler o grafo " + args[0] + "\n\n");
		
	}else{
		menu();
	}
}//Fim main	

}//Fim class

Oi, qual o erro que acontece?

obs: coloque o codigo entre as tags code

Antes de tudo, coloque seu código fonte nas tags de code public class Code {}
Melhor visualização :slight_smile: