{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Name - name = s public String getFirst return...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//© A+ Computer Science - www.apluscompsci.com //Name - //Date - //Lab - import static java.lang.System.*; public class Name { private String name; public Name() { setName(""); name = ""; } public Name(String s) { setName(s); } public void setName(String s)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { name = s; } public String getFirst() { return name.substring(0,name.indexOf(' ')); } public String getLast() { return name.substring(name.indexOf(' ')+1); } public String toString() { return name+"\n\n"; } }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online