Skip to content

Commit c7a102b

Browse files
Create Strings.java
A string is a collection of characters.
1 parent ff8b624 commit c7a102b

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Strings.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.amneziahookahlounge
2+
3+
4+
public class Main{
5+
public static void main(String [] args)
6+
{
7+
//Since the variable is a reference type we must use the new operator
8+
//When we use a reference to a variable we must instantiate the variable with the new operator
9+
String message= "Hello Guys";
10+
System.out.println(message.endsWith("!!"));//prints true
11+
System.out.println(message.startsWith("a"));//prints false
12+
13+
}
14+
}

0 commit comments

Comments
 (0)