- Get any character in string str
- Get the string length str
- Get the character with the index number n in the string k
- There is no such command
char [] greet = new char [10];
greet = 'Hello';
k = greet.length ();
System.out.print (k);
String greetings = 'Hello';
String s = greetings.substring (0.3);
String greetings = 'Hello'
String s = greetings.substring (0.3);
String greetings = 'Hello';
String s = greetings.substring (0.3);
Retrieve the characters from index 0 position to index position 2 of the greetings string and put into s
Is a data type in java
Can access objects from other methods in that class
Can be accessed anywhere in the program.
Can be accessed from classes in the same package and subclasses in other packages
Only accessible from other methods in that class