SHARE
TWEET

Untitled

a guest Sep 11th, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import javax.xml.crypto.Data;
  2.  
  3. public class DataTypesVariables {
  4.     boolean isDisabled = true;
  5.     boolean defaultBoolean;
  6.     char a = 'a';
  7.     char defaultChar;
  8.     byte x = 10;
  9.     byte defaultByte;
  10.     short y = 10;
  11.     short defaultShort;
  12.     int t = 10;
  13.     int defaultInt;
  14.     long z = 10;
  15.     long defaultLong;
  16.     float f = 3.145f;
  17.     float defaultFloat;
  18.     double d = 3.1345752D;
  19.     double defaultDouble;
  20.     static int val;
  21.     public static void main(String[] args) {
  22.         DataTypesVariables d = new DataTypesVariables();
  23.         boolean uninitializedBoolean; //local değişken
  24.         System.out.println("\n\nDeğişken   --  Default Değerleri\n");
  25.         System.out.print(d.isDisabled);
  26.         System.out.println("           " + d.defaultBoolean + "     Boolean");
  27.         System.out.print(d.a);
  28.         System.out.println("              " + String.format("\\u%04x", (int) d.defaultChar) + "    Char");
  29.         System.out.print(d.x);
  30.         System.out.println("             " + d.defaultByte + "         Byte");
  31.         System.out.print(d.y);
  32.         System.out.println("             " + d.defaultShort + "         Short");
  33.         System.out.print(d.t);
  34.         System.out.println("             " + d.defaultInt + "         Int");
  35.         System.out.print(d.z);
  36.         System.out.println("             " + d.defaultLong + "         Long");
  37.         System.out.print(d.f);
  38.         System.out.println("          " + d.defaultFloat + "       Float");
  39.         System.out.print(d.d);
  40.         System.out.println("      " + d.defaultDouble + "       Double");
  41.         System.out.println(" -             "+DataTypesVariables.val+"         Başlangıç değeri olmayan static değişken\n\n\n\n");
  42.   //      System.out.println(uninitializedBoolean);
  43.     }
  44. }
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