Use of Int, Double, and String

int x = 3;
System.out.println(x);
//For a whole number use an Integer 
double y = 2.3;
System.out.println(y);
//To use decimal points use a double
String w = "Hello";
String m = "World";
System.out.println(w + m);
//For letters/sentences use strings
3
2.3
HelloWorld

Booleans

boolean ellieHasADog = true;
boolean ellieHasAFish= false;

if (ellieHasADog)
{
    System.out.println("Ellie has a dog!");
}

else if (ellieHasAFish)
{
    System.out.println("Ellie has a fish?");

}
Ellie has a dog!

Wrapper String

Integer lucky = 444;
    String luckyStr = lucky.toString();
    System.out.println("luckyStr: " + luckyStr);

    System.out.println("length is:"+luckyStr.length());
luckyStr: 444
length is:3

Casting

double firstNumber = 5 / 2.0;
System.out.println("The first number is-" + firstNumber);
int firstNumberRounded = (int)(firstNumber + 0.5);
System.out.println("The first number rounded is-" + firstNumberRounded);
The first number is-2.5
The first number rounded is-3