Write a class named FullName containing: Two instance variables named given and family of type String . A constructor that accepts two String parameters . The value of the first is used to initialize the value of given and the value of the second is used to initialize family.

LANGUAGE: JAVA

CHALLENGE:

Write a class named FullName containing:
Two instance variables named given and family of type String .
A constructor that accepts two String parameters . The value of the first is used to initialize the value of given and the value of the second is used to initialize family.
A method named toString that accepts no parameters . toString returns a String consisting of the value of family, followed by a comma and a space followed by the value of given.

SOLUTION:

The Bad News: The content you are trying to access is only available to members.

The Good News: You too can be a member, simply Click Here.

Already a member?

Posted in ,