• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ArrayIndex in Arrays

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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"
Thanks
C.R.Muthukumar
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
New rule: no elephants at the chess tournament. Tiny ads are still okay.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic