Getting the String Encrypted

Java program to encrypt the text and then decrypt it

    import*; import javax.swing.*; import java.awt.*; import java.awt.event.*; import javax.swing.event.*; import javax.swing.border.*; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; class Subs extends JFrame implements ActionListener { String s1,s2; int i; JButton bt; JButton bt1; Border b1; Border b2; char pchar; JFrame f; JPanel jp1,jp2; Container content;

Harmonic series in JAVA

Java program to print the harmonic series

  class harmonic { int i; int j; void calc() { for(int i=1; i<10; i++) { System.out.print(“1″); System.out.print(“/”); System.out.print(i); System.out.print(“+”); } } public static void main(String…s) { harmonic h=new harmonic(); h.calc(); } }

No Thumbnail

Java Program to print a specific series(Interview question)

  class divo { int i=1; int m=1; int result=1; divo() { for(i=1;i<7;i++) { m=2*i; result=result*m*(m+1); System.out.print(2*i); System.out.print(“/”); System.out.print(“(“+result+”=”+(m+1)+”!)”); System.out.print(“+”); } } public static void main(String…s) { new divo(); } }   NOTE: I was asked this question in an interview for internship in a