• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 7

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do you fix this error?


Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 7
at dec.convertBinaryStringToString(dec.java:83)
at dbconnection.updateRows(dbconnection.java:122)
at mainenc.main(mainenc.java:8)


<
>
 
Marshal
Posts: 76802
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

You cannot sort out that sort of error in code. You need to work out what you are doing and what the lengths of the different arrays are. What does += 8 mean? Are you looking for every eight character? Where does the 7 come from? What makes you think you will have an 8‑element array? Why are you using that strange method to write a loop? Do you know what the common form of a for loop is? Did you know there is a reason for using that common form: it always works?
 
There is no beard big enough to make me comfortable enough with my masculinity to wear pink. Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic