Note that there are some explanatory texts on larger screens.

plurals
  1. PO"Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0" java error
    primarykey
    data
    text
    <p>i get this error message when i try to break in 2 parts (with "break point" the character "@") </p> <ul> <li><strong>part_fixed</strong></li> <li><p><strong>part_user</strong></p> <p>a <em>secret key</em> <strong><em>"final key"</em></strong> saved as string. </p> <pre><code> service_codeEncrypted_key = new SecretKeySpec(service_codeEncrypted, 0, 8, "DES"); System.out.println(""); System.out.println("Secret code as secret key :" + service_codeEncrypted_key); System.out.println(""); String final_key = "service_codeEncrypted_key";//key has the form xxx.xxx.xxx.xxx@yyyyy String[] parts = final_key.split("@") ; String part_fixed = parts[0]; // xxx.xxx.xxx.xxx String part_user = parts[1]; // yyyy System.out.println(""); System.out.println("Service Code decrypted : " + new String(service_codeDecrypted)); // Print the decrypted Text System.out.println(""); // System.out.println("Code for the card : " + part_user); // Print the decrypted Text System.out.println("Finish!!!"); // Print the decrypted Text System.out.println("-----------------------------------------------------------------------------------"); // Print the decrypted Text System.out.println(""); System.out.println(""); </code></pre></li> </ul> <p>The error as shown in the console in the following : </p> <p>Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at JEncrytion.main(JEncrytion.java:182)</p> <p>where line 182 is : String part_fixed = parts[0];</p> <p>The acual key has the form xxx.xxx.xxxxxx.xxx@yyyyy, and i want all the x's in one part and all the y in the second one. </p> <p>Any ideas?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload