Check out example codes for "string in java". It will help you in understanding the concepts better.

Code Example 1

In java, string is an object. It is sequence of character values enclosed by 
double quotes.

Code Example 2

//string syntax.
String hello = "Hello, world!";

Code Example 3

public String substring(int begin)/ public String substring(int begin, int end)
------------------------------------------------------------------------------
String x = "0123456789"; // the value of each char is the same as its index!
System.out.println( x.substring(5) ); // output is "56789"
System.out.println( x.substring(5, 8)); // output is "567"

Code Example 4

public boolean equalsIgnoreCase(String s)
------------------------------------------
String x = "Exit"; 
System.out.println( x.equalsIgnoreCase("EXIT")); // is "true" 
System.out.println( x.equalsIgnoreCase("tixe")); // is "false"

Code Example 5

String str = "abc";

Code Example 6

static String valueOf(int i) - returns the string representation of the int 
argument.

Learn ReactJs, React Native from akashmittal.com