Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

util packages in java

Ads

 
 

Share on Google+Share on Google+

trupti.k
util packages in java
1 Answer(s)      5 years and 5 months ago
Posted in : Java Beginners

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

Ads
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 packages
Java packages  What restrictions are placed on the location of a package statement within a source code file
Advertisements
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
Java Packages - Java Beginners
Java Packages  how to write a package by getting the inputs from the user?(ex: student details and staff qualification in one package)and also to compile and run this program
JAVA PACKAGES - Java Beginners
JAVA PACKAGES  I HAVE A DOUBT. I CRATED A PACKAGE BUT I AM NOT ABLE TO IMMPORT ANY FILES TO THE ANOTHER PACKAGE HOW CAN I IMPORT ANY PACKAGE FROM...://www.roseindia.net/java/master-java/index.shtml Thanks. Amardeep
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
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 - Java Beginners
Java package creation example  What is Package in Java? How can i create a package in Class
Java package,Java Packages
convention of packages A hierarchical naming pattern is used for java packages.... Packages in Core Java Package Description... Java Package      
io packages - Java Beginners
io packages  How can I add two integers in java using io pacages
Hi...doubt on Packages - Java Beginners
Package in java.. I have downloaded one program on Password Authentication... ..Explain me.  Hi friend, Package javax.mail The Java Mail API allows the developers to add mailing functionalities to their java applications
packages
"); it compiles succesfully but when i do c:\world>java world.HelloWorld
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
Version of com.cedarsoftware>java-util dependency
List of Version of com.cedarsoftware>java-util dependency
Regarding Documentation of Packages
Regarding Documentation of Packages  Hello How to get java packages ie documentation of classes ,Interfaces and methods from windows command prompt.In the sense Java.lang,java.awt,java.math etc
Packages needed for JDBC in Linux
Packages needed for JDBC in Linux  Can anyone tell me the packages needed to run a program with JDBC in Red Hat 5