Explore BrainMass

Explore BrainMass

    usage of class and object declaration

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

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

    © BrainMass Inc. brainmass.com November 24, 2022, 11:30 am ad1c9bdddf

    Solution Preview

    Please save as "PersonNameProblem.java"

    public class PersonNameProblem
    public static void main(String[] args)
    PersonName pn = new PersonName("John","Albert");
    PersonName fpn = new ...

    Solution Summary

    The usage of class and object declaration is shown.