util packages in java

Ads
 

util packages in java

write a java program to display present date and after 25days what will be the date?

View Answers

March 23, 2012 at 11:34 AM

import java.util.*;
import java.text.*;
class FindDate{
    public static void main(String[] args){
        Date today = new Date();
        SimpleDateFormat sdf=new SimpleDateFormat("dd-MM-yyyy");
        String presentDate=sdf.format(today);
        System.out.println("Current Date: "+presentDate);
        Calendar cal = new GregorianCalendar();
        cal.setTime(today);
        cal.add(Calendar.DAY_OF_MONTH, 25);
        Date newDate = cal.getTime();
        String date=sdf.format(newDate);
        System.out.println("Date after 25 days: "+date);

    }
}

Ads









Related Tutorials/Questions & Answers:
util packages in java
util packages in java  write a java program to display present date and after 25days what will be the date?   import java.util.*; import java.text.*; class FindDate{ public static void main(String[] args
java.net packages - Java Beginners
java.net packages  Tell me some impotant classes to used in java.net packages?  hi friend, import java.net.*; import java.io...., http://www.roseindia.net/java/network/index.shtml Thanks
Advertisements
creating packages in java
creating packages in java  Hi everybody, I am Rupesh Narayan, i faces a problem while creating package in core java. I write two programs that are described below:- 1.PackageDemo.java package javaclass; import java.io.*; public
Java package,Java Packages
convention of packages A hierarchical naming pattern is used for java packages.... Packages in Core Java Package Description... Java Package      
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
"); it compiles succesfully but when i do c:\world>java world.HelloWorld
Version of com.cedarsoftware>java-util dependency
List of Version of com.cedarsoftware>java-util dependency
Version of com.livae>java-util dependency
List of Version of com.livae>java-util dependency
Version of com.metamx>java-util dependency
List of Version of com.metamx>java-util dependency
Version of com.simiacryptus>java-util dependency
List of Version of com.simiacryptus>java-util dependency
Maven Dependency java-util >> 1.14.0
You should include the dependency code given in this page to add Maven Dependency of com.cedarsoftware >> java-util version1.14.0 in your project
Maven Dependency java-util >> 1.8.1
You should include the dependency code given in this page to add Maven Dependency of com.cedarsoftware >> java-util version1.8.1 in your project
Maven Dependency java-util >> 1.20.5
You should include the dependency code given in this page to add Maven Dependency of com.cedarsoftware >> java-util version1.20.5 in your project
Maven Dependency java-util >> 1.5.0
You should include the dependency code given in this page to add Maven Dependency of com.cedarsoftware >> java-util version1.5.0 in your project
Maven Dependency java-util >> 1.7.4
You should include the dependency code given in this page to add Maven Dependency of com.cedarsoftware >> java-util version1.7.4 in your project
Maven Dependency java-util >> 1.19.1
You should include the dependency code given in this page to add Maven Dependency of com.cedarsoftware >> java-util version1.19.1 in your project
Maven Dependency java-util >> 1.25.0
You should include the dependency code given in this page to add Maven Dependency of com.cedarsoftware >> java-util version1.25.0 in your project
Maven Dependency java-util >> 1.24.0
You should include the dependency code given in this page to add Maven Dependency of com.cedarsoftware >> java-util version1.24.0 in your project
Maven Dependency java-util >> 1.18.1
You should include the dependency code given in this page to add Maven Dependency of com.cedarsoftware >> java-util version1.18.1 in your project
Maven Dependency java-util >> 1.20.2
You should include the dependency code given in this page to add Maven Dependency of com.cedarsoftware >> java-util version1.20.2 in your project
Maven Dependency java-util >> 1.4.0
You should include the dependency code given in this page to add Maven Dependency of com.cedarsoftware >> java-util version1.4.0 in your project

Ads