util packages in java

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);

    }
}









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
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
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
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 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
packages - Java Beginners
Java package creation example  What is Package in Java? How can i create a package in Class
io packages - Java Beginners
io packages  How can I add two integers in java using io pacages
Java package,Java Packages
of packages A hierarchical naming pattern is used for java packages, with levels... Packages in Core Java Package Description... Java Package      
packages
"); it compiles succesfully but when i do c:\world>java world.HelloWorld
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 - Java Interview Questions
Packages - Java Interview Questions
packages
Maven dependency for com.gu - story-packages-model_2.11 version 2.0.4 is released. Learn to use story-packages-model_2.11 version 2.0.4 in Maven based Java projects
; com.gu - story-packages-model_2.11 version 2.0.4 in Java projects. Follow...; com.gu - story-packages-model_2.11 version 2.0.4 java library in your project...Maven dependency for  com.gu  - Version 2.0.4 of story-packages
Maven dependency for com.gu - story-packages-model_2.11 version 2.0.3 is released. Learn to use story-packages-model_2.11 version 2.0.3 in Maven based Java projects
; com.gu - story-packages-model_2.11 version 2.0.3 in Java projects. Follow...; com.gu - story-packages-model_2.11 version 2.0.3 java library in your project...Maven dependency for  com.gu  - Version 2.0.3 of story-packages
Maven dependency for com.gu - story-packages-model_2.11 version 0.4.0 is released. Learn to use story-packages-model_2.11 version 0.4.0 in Maven based Java projects
; com.gu - story-packages-model_2.11 version 0.4.0 in Java projects. Follow...; com.gu - story-packages-model_2.11 version 0.4.0 java library in your project...Maven dependency for  com.gu  - Version 0.4.0 of story-packages
Maven dependency for com.gu - story-packages-model_2.10 version 1.0.2 is released. Learn to use story-packages-model_2.10 version 1.0.2 in Maven based Java projects
to use  com.gu - story-packages-model_2.10 version 1.0.2 in Java projects...Maven dependency for  com.gu  - Version 1.0.2 of story-packages-model_2.10 released The developers of   com.gu - story-packages
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
Maven dependency for com.gu - story-packages-model-thrift version 2.1.0-RC1 is released. Learn to use story-packages-model-thrift version 2.1.0-RC1 in Maven based Java projects
Maven dependency for  com.gu  - Version 2.1.0-RC1 of story-packages-model-thrift released The developers of   com.gu - story-packages... 2022, the released version of  com.gu - story-packages-model-thrift library
Maven dependency for com.gu - story-packages-model-thrift version 2.2.0 is released. Learn to use story-packages-model-thrift version 2.2.0 in Maven based Java projects
to use  com.gu - story-packages-model-thrift version 2.2.0 in Java projects... and includes  com.gu - story-packages-model-thrift version 2.2.0 java...Maven dependency for  com.gu  - Version 2.2.0 of story-packages
Maven dependency for com.gu - story-packages-model-thrift version 2.2.0-beta.1 is released. Learn to use story-packages-model-thrift version 2.2.0-beta.1 in Maven based Java projects
- story-packages-model-thrift version 2.2.0-beta.1 java library in your project...-packages-model-thrift released The developers of   com.gu - story-packages... 2022, the released version of  com.gu - story-packages-model-thrift
Maven dependency for com.gu - story-packages-model-thrift version 2.2.0-beta.0 is released. Learn to use story-packages-model-thrift version 2.2.0-beta.0 in Maven based Java projects
- story-packages-model-thrift version 2.2.0-beta.0 java library in your project...-packages-model-thrift released The developers of   com.gu - story-packages... 2022, the released version of  com.gu - story-packages-model-thrift
Maven dependency for com.gu - story-packages-model-thrift version 2.0.4 is released. Learn to use story-packages-model-thrift version 2.0.4 in Maven based Java projects
to use  com.gu - story-packages-model-thrift version 2.0.4 in Java projects... and includes  com.gu - story-packages-model-thrift version 2.0.4 java...Maven dependency for  com.gu  - Version 2.0.4 of story-packages
Maven dependency for com.gu - story-packages-model-thrift version 2.0.3 is released. Learn to use story-packages-model-thrift version 2.0.3 in Maven based Java projects
to use  com.gu - story-packages-model-thrift version 2.0.3 in Java projects... and includes  com.gu - story-packages-model-thrift version 2.0.3 java...Maven dependency for  com.gu  - Version 2.0.3 of story-packages
Maven dependency for com.gu - story-packages-model-thrift version 2.0.0 is released. Learn to use story-packages-model-thrift version 2.0.0 in Maven based Java projects
? Steps to use  com.gu - story-packages-model-thrift version 2.0.0 in Java...Maven dependency for  com.gu  - Version 2.0.0 of story-packages-model-thrift released The developers of   com.gu - story-packages-model
ModuleNotFoundError: No module named 'packages'
ModuleNotFoundError: No module named 'packages'  Hi, My Python... 'packages' How to remove the ModuleNotFoundError: No module named 'packages... to install padas library. You can install packages python with following
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
Joomla Development Packages
Joomla Development Packages  In offshore services, we also offer a full-bodied package on various Joomla CMS like: Joomla Custom Templates Package Joomla Starter Package Joomla Standard Package Joomla Composite Package
Agra Travel Packages
Agra Travel Packages We are offering customized Agra Travel Packages which... customization of these packages based on your travel requirements. As an individual... family trip as well as customized group travel packages. Agra group packages
Other Base Packages
Other Base Packages I/O For handling i/o of an application in java , java.io.... (adsbygoogle = window.adsbygoogle || []).push({}); Java Management Extensions (JMX... as Java Management Extensions (JMX). Examples are monitoring and management
ModuleNotFoundError: No module named 'deepak-packages'
ModuleNotFoundError: No module named 'deepak-packages'  Hi, My... named 'deepak-packages' How to remove the ModuleNotFoundError: No module named 'deepak-packages' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'lambda_packages'
ModuleNotFoundError: No module named 'lambda_packages'  Hi, My... named 'lambda_packages' How to remove the ModuleNotFoundError: No module named 'lambda_packages' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'lambda_packages'
ModuleNotFoundError: No module named 'lambda_packages'  Hi, My... named 'lambda_packages' How to remove the ModuleNotFoundError: No module named 'lambda_packages' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'lambda_packages'
ModuleNotFoundError: No module named 'lambda_packages'  Hi, My... named 'lambda_packages' How to remove the ModuleNotFoundError: No module named 'lambda_packages' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'simple-packages'
ModuleNotFoundError: No module named 'simple-packages'  Hi, My... named 'simple-packages' How to remove the ModuleNotFoundError: No module named 'simple-packages' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'sphinxcontrib-packages'
ModuleNotFoundError: No module named 'sphinxcontrib-packages'  Hi...: No module named 'sphinxcontrib-packages' How to remove the ModuleNotFoundError: No module named 'sphinxcontrib-packages' error? Thanks   Hi
ModuleNotFoundError: No module named 'deepak-packages'
ModuleNotFoundError: No module named 'deepak-packages'  Hi, My... named 'deepak-packages' How to remove the ModuleNotFoundError: No module named 'deepak-packages' error? Thanks   Hi, In your python
Version of com.cedarsoftware>java-util dependency
List of Version of com.cedarsoftware>java-util dependency

Ads