Advertisement
RazorBlade57

Chris's Variable Program

Oct 31st, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. public class Name {
  2.  
  3. private String fullName, first, last;
  4.  
  5. public Name() //Default Constructor
  6. {
  7. fullName = first + " " + last;
  8. first = "FirstName";
  9. last = "LastName";
  10. }
  11.  
  12. public Name(String n, String f ,String l)
  13. {
  14. fullName = n;
  15. first = f;
  16. last = l;
  17. }
  18.  
  19. public void nameSet(){
  20. int name = fullName.indexOf(" ");
  21. String new = fullName.substring(name);
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement