there is a problem with java code
i need your help plz as soon as you can
import javax.swing.*;
import java.io.*;
/**
*Homework #1 CaesarCipher.java
*program to encrypt and decrypt stuff
*/
public static void main(String[] args) {
ceasar1 cc = new ceasar1();
public class ceasar1
{
public String dataencyptS, sInt;
public int offsetI;
public void main(String [] args) {
dataencyptS=JOptionPane.showInputDialog("Input Data to encypt:");
sInt=JOptionPane.showInputDialog("Input the key offset:");
offsetI = Integer.parseInt( sInt );
}
private void translate(int offsetI) {
char c;
while ((byte)(c = getNextChar()) != -1) {
if (Character.isLowerCase(c)) {
c = rotate(c, offsetI);
}
System.out.print(c);
}
}
public char getNextChar() {
char ch = ' ';
try {
ch =(char)dataencyptS.read();
}
catch (IOException e)
{
System.out.println("Exception reading character");
}
return ch;
}
// rotate: translate using rotation, version with table lookup
public char rotate(char c, int offsetI) { // c must be lowercase
String s = "abcdefghijklmnopqrstuvwxyz";
int i = 0;
while (i < 26) {
// extra +26 below because key might be negative
if (c == s.charAt(i))
return s.charAt((i + offsetI + 26)%26);
i++;
}
return c;
}
}