Skip to content

Commit f2b6fbe

Browse files
Create Stringlist.java
1 parent 458c7da commit f2b6fbe

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

String/Stringlist.java

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
public class Stringlist {
3+
4+
5+
6+
void display()
7+
{
8+
String name1="Java return keyword is used to complete the execution of a method. The return followed by the appropriate value that is returned to the caller. This value depends on the method return type like int method always return an integer value.";
9+
System.out.println("Length of the String "+name1.length());
10+
System.out.println(" ");
11+
System.out.println("Uppercase "+name1.toUpperCase());
12+
System.out.println(" ");
13+
System.out.println("lowercase "+name1.toLowerCase());
14+
System.out.println(" ");
15+
System.out.println("Starts with string "+name1.startsWith("J"));
16+
System.out.println(" ");
17+
System.out.println("Ends with String "+name1.endsWith("e"));
18+
System.out.println(" ");
19+
System.out.println("Char at method of string "+name1.charAt(100));
20+
System.out.println(" ");
21+
System.out.println("Index of the String "+name1.indexOf("e"));
22+
23+
}
24+
25+
26+
public static void main(String[] args) {
27+
// TODO Auto-generated method stub
28+
29+
Stringlist s=new Stringlist();
30+
s.display();
31+
32+
}
33+
34+
}

0 commit comments

Comments
 (0)