Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Programming: Flip Names

Write a program that reads a name in first last format and convert it to last first format .

Tutorial Details:

Write a program that reads a name in first last format and convert it to last first format (separated by a comma and blank). You may use either console (Scanner) or dialog (JOptionPane) input and output.

Example input and output values
Input : Michael Maus
Output: Maus, Mickey

Input : Arnold Schwarzenegger
Output: Schwarzenegger, Arnold
Hint
Use indexOf(...) to find the blank, then use substring(...) to extract the first and last names.


 

Rate Tutorial:
http://www.roseindia.net/java/java-tips/examples-introductory/dialog/q-pr-flipNames.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Programming: Flip Names

View Tutorial:
Programming: Flip Names

Related Tutorials:

Build an object database - JavaWorld January 2000
Build an object database - JavaWorld January 2000
 
Build an object database, Part 2: Object storage backend - JavaWorld April 2000
Build an object database, Part 2: Object storage backend - JavaWorld April 2000
 
Mapping XML to Java, Part 2 - JavaWorld October 2000
Mapping XML to Java, Part 2 - JavaWorld October 2000
 
Take control of the servlet environment, Part 3 - JavaWorld January 2001
Take control of the servlet environment, Part 3 - JavaWorld January 2001
 
Smartly load your properties
Smartly load your properties
 
Good introduction
Good introduction
 
Good ideas
Good ideas
 
FastParser 1.6.3
FastParser 1.6.9.1 XML Edition FastParser is a Java Xml parser High performance XML parser (benchmarks* : up to +100% faster compared to Xerces and JDK1.4 integrated parser) SAX Level 1 and 2 compliant DOM support JAXP compatibility Names
 
Learn to speak Jamaican
Introducing Jamaica, a JVM macro assembler language Most Java programmers, at one time or another, have wondered how the JVM works. Java bytecode programming reveals much insight into the JVM and helps developers program Java better. Also, the ability t
 
Java and .Net interoperability using CORBA
Java and .Net interoperability using CORBA A recently released product takes the pain out of implementing object-level calls between Java and .Net While the need for interoperability between Java and .Net has become a common problem in larger organ
 
Koalog Configurator v1.0
What is Koalog ConfiguratorTM? Koalog ConfiguratorTM is a configurator written in JavaTM. It comes with two graphical user interfaces (a Swing and web one), an XML importer and a maintenance application. With Koalog ConfiguratorTM, users can rapidly
 
Attribute-Oriented Programming with Java 1.5, Part 2
Peeking Inside the Box: Attribute-Oriented Programming with Java 1.5,Part In the previous article in this series, "Peeking Inside the Box, Part 1," I introduced the concepts of Attribute-Oriented Programming, Java 1.5 annotations, and bytecode instrume
 
The Open For Business Project: Rule Engine Guide
The Open For Business Project: Rule Engine Guide
 
Smokescreen Introduction
Smokescreen is a Java obfuscator. Aside from being able to change symbolic names, it can also modify the bytecode instructions in methods thereby obfuscating control flow. This makes the resulting obfuscated classes much more difficult to decompile.
 
Smokescreen 3.4 has been released
Smokescreen is a Java obfuscator. Aside from being able to change symbolic names, it can also modify the bytecode instructions in methods thereby obfuscating control flow. This makes the resulting obfuscated classes much more difficult to decompile.
 
What package names are defined in the J2ME environment?
A compendium of J2ME package names, neatly arranged by JSR and presented for your illumination.
 
What are the defined J2ME system property names?
A compilation of J2ME properties sorted by JSR. Learn the names, test for optional packages or retrieve platform specific configuration values.
 
Domain Registration Guide
Domain Registration Guide Domain Registration Guide What is Domain? Internet is the large network of computers. On the Internet there should be some way to identify the computers. Domain name is the solution for this. Domain Name is the unique
 
Struts Validator Framework Tutorial with Example
Struts Validator Framework Tutorial with Example Struts HTML Tags Struts Validator Framework This lesson introduces you the Struts Validator Framework. In this lesson you will learn how to use Struts Validator Framework to validate the user
 
Using DTrace to Profile and Debug A C++ Program (Technical Article)
In this test case, the DTrace capability in the Solaris 10 OS is used to identify an error common to C++ applications -- the memory leak.
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.