Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to store and retrieve items?
    text
    copied!<p>I need to store all encrypted messages so it may be retrieved and displayed by pressing a button, that is, press the button 3 times for the last 3rd message;</p> <p>After retrieving an encrypted message , let user guess (type into a textbox) the original message and press a button. Display how many characters are correct and how many wrong.</p> <p>Really sorry for the bad question. here's an example of my current coding. basically i take the input from a textfield. so how do i store and retrieve the input?</p> <pre><code>String input = txtInput.getText(); StringBuilder builder = new StringBuilder(); char[] charArray = input.toCharArray(); for(int i = 0; i &lt; charArray.length; i +=2) { if(i+1 &lt; charArray.length) { //even builder.append(charArray[i+1]); } //odd builder.append(charArray[i]); } String flippedText = builder.toString(); lblencryted.setText(flippedText); for(int i = 0; i &lt; 100; i++){ String[] storeArray = {flippedText}; } } private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { String input = txtInput.getText(); StringBuilder builder = new StringBuilder(); char[] charArray = input.toCharArray(); for(int i = 0; i &lt; charArray.length; i +=2) { if(i+1 &lt; charArray.length) { //even builder.append(charArray[i+1]); } //odd builder.append(charArray[i]); } String flippedText = builder.toString(); lblretrieve.setText(flippedText); } public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new Encryption().setVisible(true); } }); } </code></pre>
 

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