-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
26 lines (22 loc) · 908 Bytes
/
Copy pathMain.java
File metadata and controls
26 lines (22 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.company;
public class Main {
public static void main(String[] args) {
//byte,short,int,long,float,double,char,boolean
String myString="This is a string";
System.out.println("my string is equal to "+ myString);
myString=myString +", and this is more.";
System.out.println("my string is equal to "+ myString);
myString=myString +"\u00A9 2019";
System.out.println("my string is equal to "+ myString);
String numberString="250.55";
numberString=numberString+"49.95";
System.out.println(numberString);
String lastString="10";
int myInt=50;
lastString=lastString+myInt;
System.out.println("LastString is equal to "+lastString);
double doubleNUmber =33.57d;
lastString=lastString+doubleNUmber;
System.out.println("lastString is equal to "+lastString);
}
}