File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes ArrayIndex in Arrays Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "ArrayIndex in Arrays" Watch "ArrayIndex in Arrays" New topic

ArrayIndex in Arrays

Ranch Hand

Joined: Dec 03, 2004
Posts: 59
Hello JavaProgrammers,
None of the questions that were posed earlier could find solutions in java,that has now resulted me to get a tendancy to switch over to C++,though this is not an easy endeavour either.So as a final resort to get the real motivation for the continued grip for Java,let me get the correct procedure for array index being out of bounds especialy so for a very simple folowing code in Java.(ShortestPath.txt)

So should Or should not I say "Cheerio" for the "JAVA"
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

You haven't posted a question since May, so I'm not sure what other issues you're referring to, nor can I figure out what you're asking here. Do you have a question? If so, what is it?

Note that a statement like

System.out.println(" arr[j] ");

will print, on a line by itself, the characters "arr[i][j]". If you'd like to print the value of that array element surrounded by spaces, something like this would be appropriate:

System.out.print(" " + arr[i][j] + " ");

Note that [i]none
of those import statements do anything here.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: ArrayIndex in Arrays
It's not a secret anymore!