Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. public static void main(String[] args) throws IOException{
  2.  
  3. File inputFile = new File("test.txt");
  4. Scanner input = new Scanner(inputFile);
  5.  
  6. int count = 1;
  7. int rows = input.nextInt();
  8. int columns = input.nextInt();
  9.  
  10. char[][] array;
  11. array = new char[rows][columns];
  12. input.nextLine();
  13.  
  14. for(int i = 0; i < array.length; i++){
  15. for(int j = 0; j < array[0].length; j++){
  16. System.out.print(array[i][j]);
  17.  
  18. }
  19.  
  20. System.out.println();
  21. }input.close();
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement