Advertisement
Guest User

Untitled

a guest
Jul 4th, 2015
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. import javax.swing.JOptionPane;
  2.  
  3. //Niholas Joannou 2015-07-04
  4. public class Calculations {
  5.  
  6.     public static void main(String[] args) {
  7.        
  8.         String num="";
  9.        
  10.         num=JOptionPane.showInputDialog("Enter a decimal number");
  11.        
  12.         System.out.println("Your number is " + num);
  13.        
  14.        
  15.         System.out.println("The length of your number is " + num.length());
  16.  
  17.     }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement