Question: a.How will the following code snippet be modified to print ONLY the contents of the last index? { String names[] = { Alhaji, Togbe, Tolon-Naa,
a.How will the following code snippet be modified to print ONLY the contents of the last index?
{
String names[] = { "Alhaji", "Togbe", "Tolon-Naa", Osabarima,kofi};
{
System.out.printIn ( names.length ) ;
}
}
3 marks
b. Modify the code to printout the length of the array.
5 marks
8. Given the following code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
