get paid to paste

java-tut-initializing-variables-char-escape-1

public class Beginner
{
  boolean booleanVar = true;
  byte byteVar = 0b10101;
  short shortVar = 035;
  int intVar = 0xFFA3;
  long longVar = 1000;
  double doubleVar = 0.5d;
  float floatVar = 3.5f;
  char charVar = '\u0090';
  String strVar = "\u0048\u0065\u006C\u006C\u006F";
  

  public static void main(String[] args)
  {
    Beginner beginner;
    beginner = new Beginner();

    System.out.print("boolean: ");
    System.out.println(beginner.booleanVar);
    System.out.print("byte: ");
    System.out.println(beginner.byteVar);
    System.out.print("short: ");
    System.out.println(beginner.shortVar);
    System.out.print("int: ");
    System.out.println(beginner.intVar);
    System.out.print("long: ");
    System.out.println(beginner.longVar);
    System.out.print("double: ");
    System.out.println(beginner.doubleVar);
    System.out.print("float: ");
    System.out.println(beginner.floatVar);
    System.out.print("char: ");
    System.out.println(beginner.charVar);
    System.out.print("String: ");
    System.out.println(beginner.strVar);
  }
}

Pasted: Nov 28, 2024, 8:29:22 am
Views: 8