forked from puruagarwal1/hacktoberfest-2022-directory
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStringBufferMutable.java
More file actions
39 lines (30 loc) · 909 Bytes
/
StringBufferMutable.java
File metadata and controls
39 lines (30 loc) · 909 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
27
28
29
30
31
32
33
34
35
36
37
38
39
public class DataTypesPractice {
public static void main(String[] args) {
byte b=123;
short s=234;
int i=234;
int i1=0b1010;//bunary number to int
System.out.println(i1);
int u=0x1A;//hexdecimal number to int
System.out.println(u);
int p=01234;//octal number to int
System.out.println(p);
long l=83763;
float f=10.1234f;
double d=123.9732654734;
System.out.println(d);
double d1='e';//asscii to double
System.out.println(d1);
double d2=12_3__45.327_3;//we can use like this from 1.7 version
System.out.println(d2);
char c='r';
char c1=97;//accii code to int
System.out.println(c1);
char c2=0xFace;//hexdeceimal it prints ?
System.out.println(c2);
char c3='\u0050';//unicode characters
System.out.println(c3);
boolean bb=true;
System.out.println(b+":"+s+":"+i+":"+l+":"+f+":"+d+c+bb);
}
}