1 byte
2 short
3 int
4 long
5 float
6 double
7 char
8 boolean
package com.cnc;
public class Main {
public static void main(String[] args) {
//STRING---> A SEQ OF CHAR
String myString = "This is a string";
System.out.println("myString is = "+myString);
myString = myString +", and this is more..";
System.out.println("myString is = to "+ myString);
myString = myString+" \u00A9 2020";
System.out.println("myString is = to "+myString);
String numberString = "255.66";
numberString = numberString+"49.55";
System.out.println(numberString);
String lastString ="10";
int myInt = 50;
lastString = lastString + myInt;
System.out.println(lastString);
}
}
OUTCOMES
myString is = This is a string
myString is = to This is a string, and this is more..
myString is = to This is a string, and this is more.. © 2020
255.6649.55
1050