Java tutorial
//package com.java2s; /** * Apache License, Version 2.0 * http://www.apache.org/licenses/LICENSE-2.0.html * * */ public class Main { public static boolean isToString(Object valueObj) { if (valueObj.getClass().getPackage().getName().startsWith("java.")) return true; else return false; } }