- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStrEx.java
More file actions
Latest commit
19 lines (19 loc) · 534 Bytes
/
Copy pathStrEx.java
File metadata and controls
19 lines (19 loc) · 534 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
importjava.lang.*;
publicclassStrEx
{
publicstaticvoidmain(Stringargs[])
{
Stringstr1="Java";
Stringstr2=newString("New Java");
charc[]={'H','e','l','l','o'};
byteb[]={65,66,67,68};
Stringstr3=newString(c);
Stringstr4=newString(b);
Stringstr5=newString(b,1,2);
System.out.println("string"+str1);
System.out.println(str2);
System.out.println(str3);
System.out.println(str4);
System.out.println(str5);
}
}