String greeting = 'Hello';
int k = greeting.length ();
System.out.print (k);
- 4
- 5
- 6
- 7
The multiple choice questions about Java programming will provide you with useful knowledge in the process you apply to learning as well as working with Java. Invite your reference.
String greeting = 'Hello';
int k = greeting.length ();
System.out.print (k);
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