Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ARRAYS AND STRINGS  RSS feed

 
J Doggett
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have another question and I don't even know how to get it started let alone do it. The quesiton is.
Create a class that holds three initialized StringBuffer objects; your first name, middle name, and last name. Create three new StringBuffer objects as follows:
- an object named EntireName that holds your three names, separated by spaces
- an object named LastFirst that holds your last name, a comma, a space, and your first name, in that order.
- an object named Signature that holds your first name, a space, your middly initial (not the entire name), a period, a space, and your last name
Display all three objects.
 
Sonny Pondrom
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
StringBuffer sb = firstName + " " + middleName.substring(1) + ". " +lastName ;

Think about it.
[ August 08, 2004: Message edited by: Sonny Pondrom ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi J, welcome to JavaRanch.

Unfortunately, you have posted your Java In General questions in a Servlets forum.

This forum is for Servlets questions, and since you question is not about Servlets, I am going to move this to the Java In General (Beginner) forum.

Thanks

Mark
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!