We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0387757 commit 0fdcc2fCopy full SHA for 0fdcc2f
String.java
@@ -0,0 +1,13 @@
1
+public class Stringg
2
+{
3
+ public static void main(String[] args)
4
+ {
5
+ String s1 = "Hello"; //creating string by java string literal
6
+ char ch[] = {'J','A','V','A'};
7
+ String s2 = new String(ch); //converting char array to string
8
+ String s3 = new String("Program"); ////creating java string by new keyword
9
+ System.out.println(s1);
10
+ System.out.println(s2);
11
+ System.out.println(s3);
12
+ }
13
+}
0 commit comments