daily pastebin goal
39%
SHARE
TWEET

Untitled

Conderoga Apr 13th, 2011 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Text1 {
  2.  
  3.     public static void main(String [] args){
  4.                 DoubleInt d = new DoubleInt(4,5);
  5.  
  6.                 System.out.println(d.num1+" "+d.num2);
  7.  
  8.                 d.num1 = 7;
  9.                 d.num2 = 2;
  10.  
  11.         System.out.println(d.num1+" "+d.num2);
  12.  
  13.         DoubleInt d2 = new DoubleInt(10,-55);
  14.         System.out.println(d.num1+" "+d.num2);
  15.         System.out.println(d2.num1+" "+d2.num2);
  16.     }
  17.  
  18. public static class DoubleInt{
  19.         public  int num1;
  20.         public  int num2;
  21.  
  22.         public DoubleInt(int a, int b){
  23.                 num1 = a;
  24.                 num2 = b;
  25.         }
  26.     }
  27.  
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top