Java - Write code to get Full Java Name from Class<?>

Requirements

Write code to get Full Java Name from Class<?>

Demo

//package com.book2s;

public class Main {
    public static void main(String[] argv) {
        Class c = String.class;
        System.out.println(getFullJavaName(c));
    }/*from  w ww  .  j a v a 2 s. co  m*/

    public static String getFullJavaName(Class<?> c) {
        return c.getName();
    }
}