Hello,
Im trying to find the position of all the spaces from within a value I stored in a string with a Scanner. Ive been at it two days and I dont seem to be getting anywhere with various indexOf 's Ive tried. I was thinking if i cant store a space then maybe I would split the sting at the space and search the first char after the split.
This is what I'm at so far.
import java.util.Scanner;
public class Initials
{
public static void main(String[] args)
{
Scanner myKeyboard = new Scanner(System.in); // Initializing new Scanner
System.out.println("Please enter full name: ");
String fullName = myKeyboard.next(); // Statement to store value inputed from keyboard
System.out.println("" + fullName);
int lastnamestart = firstName.indexOf(' ');
String title = "hello my name is Warren"
If someone could point me in the right direction I can figure out the finer details
Cheers