- Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathStrings.java
More file actions
Latest commit
13 lines (11 loc) · 399 Bytes
/
Copy pathStrings.java
File metadata and controls
13 lines (11 loc) · 399 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
publicclassStrings
{
publicstaticvoidmain(String [] args)
{
//Since the variable is a reference type we must use the new operator
//When we use a reference to a variable we must instantiate the variable with the new operator
Stringmessage= "Hello Guys";
System.out.println(message.endsWith("!!"));//prints true
System.out.println(message.startsWith("a"));//prints false
}
}