Last active
April 7, 2017 10:48
-
-
Save saqibmehmoodgit/fd042d14d3d4f9605bc6cc49f2c101c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Country | |
{ String name ; | |
// getter and setter | |
@Override | |
public String toString() { | |
return "Country [name=" + name + "]"; } | |
} | |
public class GenMethd { | |
public static <T> boolean getGenrcs(T t) | |
{ | |
System.out.println(" class name "+t.getClass().getSimpleName()); | |
System.out.println(" country with toString "+t); | |
// Country.getName(); | |
}} | |
/// Main Methods | |
Country c = new Country(); | |
boolean s= GenMethd.getGenrcs(c); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment