Monday, March 25, 2013

How to get Mime Type in simple way.

Call method
getMimeType("file://" + dosPath)

public static String getMimeType(String fileUrl) throws, MalformedURLException {
              String type = null;
              URL u = new URL(fileUrl);
              URLConnection uc = null;
              uc = u.openConnection();
              type = uc.getContentType();
              return type;

How to Calculate the Future Investment Value of Investment.

Below java program for calculate future investment value. Here calculate s using the formula futureInvestmentValue =investmentAmount x (...