- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStringMethods.java
More file actions
Latest commit
22 lines (18 loc) · 548 Bytes
/
Copy pathStringMethods.java
File metadata and controls
22 lines (18 loc) · 548 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//StringMethods.java
//This progrma demonstrates a few of the String methods.
publicclassStringMethods
{
publicstaticvoidmain(String[] args)
{
Stringmessage = "Java is Great Fun!";
Stringupper = message.toUpperCase();
Stringlower = message.toLowerCase();
charletter = message.charAt(2);
intstringSize = message.length();
System.out.println(message);
System.out.println(upper);
System.out.println(lower);
System.out.println(letter);
System.out.println(stringSize);
}
}