madhawaseeeee

example

Nov 3rd, 2014
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. import javax.swing.JOptionPane;
  2. public class NewClass4 {
  3.  
  4. public static void main(String[] args) {
  5.  
  6. String[] test1 = new String[2];
  7. int[] test2 = new int[2];
  8. String t1 = null;
  9. int t2;
  10.  
  11. for (int i = 1; i < 2; i++) {
  12. t1 = JOptionPane.showInputDialog(null, "enter any string value");
  13. t2 = Integer.parseInt(JOptionPane.showInputDialog(null, "enter integer value"));
  14.  
  15. test1[i] = t1;
  16. test2[i] = t2;
  17.  
  18. }
  19. int result = Integer.parseInt(t1)/5;
  20. System.out.println(result);
  21.  
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment