Share
Explore BrainMass

usage of class and object declaration

Write a definition of a Java class called "PersonName". The class should be defined so that the program below has the indicated output.

Solution Preview

Please save as "PersonNameProblem.java"

public class PersonNameProblem
{
public static void main(String[] args)
{
PersonName pn = new PersonName("John","Albert");
System.out.println(pn.fml());
System.out.println(pn.lfm());
PersonName fpn = new ...

Solution Summary

The usage of class and object declaration is shown.

$2.19