X469: Generics - Generic Method

Given a class Answer<E>, write a method that converts argument e into String and returns that value. If the value is a primitve, (int or char), then you must do the conversion. If the value is an object, then just call toString().

Examples:

allString('c') -> "c"
allString(1) -> "1"

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.