JavaTweets

Blog on Java Programming and Interview Questions

Date & Calendar Examples



  • How to Add or Subtract Date in Java
  • How To Compare two java.util.Date objects using Date.CompareTo() method
  • How To Compare two java.util.Date objects using Date.Before(), Date.After() And Date.Equals()
  • How To Compare two java.util.Date objects using Calendar.Before(), Calendar.After() And Calendar.Equals()
  • How To Compare two java.util.Date objects using Calendar.CompareTo()
  • How to Format Dates and Times using SimpleDateFormat in Java
  • How to convert String to Date in java?
  • Convert date string from one format to another format using SimpleDateFormat
  • How to Add or Subtract time using Calendar in Java
  • Add or subtract weeks to current date using Java Calendar
  • How To Get Current Date Time in Java
  • Get current TimeZone using Java Calendar
  • Display Current Time in Different Time Zones in Java
  • Create a Date object using the Calendar class
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Home
View mobile version
Subscribe to: Posts (Atom)

Total Pageviews

Blog Archive

  • ▼  2012 (254)
    • ▼  August (44)
      • When should I use an interface instead of an abstr...
      • Compare two StringBuffer objects in Java
      • New Java 7 Features: Using String in the Switch St...
      • Comparing String with StringBuilder in Java
      • Comparing String with StringBuffer in Java
      • Difference between == , equals and equalsIgnoreCase
      • Java String to byte Array Example
      • Java Substring Example
      • Java String to Upper Case example
      • Java String to Lower Case example
      • Java String isEmpty Example
      • Java String Reverse Example
      • Java String Trim Example
      • Java String Split Example
      • Java String Replace Example
      • Java String Length Example
      • Determining If a String Contains a Substring in Java
      • Java String Concatenation and Performance
      • Java String Compare using compareTo and compareToI...
      • Java String methods - indexOf() and lastIndexOf()
      • Searching a String for a Character or a Substring ...
      • Java Char Array To String Example
      • Convert String to Character Array Example
      • Copy all the key-value pairs from one Map into ano...
      • Get Tail Map from Java TreeMap example
      • Get Head Map from Java TreeMap example
      • Get Sub Map from Java TreeMap example
      • Get lowest and highest key stored in Java TreeMap ...
      • Get Synchronized Map from Java TreeMap example
      • Remove value from Java TreeMap example
      • Remove all values from Java TreeMap example
      • Get Size of Java TreeMap Example
      • Check if a particular value exists in Java TreeMap...
      • Check if a particular key exists in Java TreeMap e...
      • How to get all keys in Java TreeMap?
      • Get Set view of Keys from Java TreeMap example
      • Iterate through the values of Java TreeMap example
      • Simple Java TreeMap example
      • Checked vs Unchecked Exceptions in Java
      • Creating user defined exceptions in Java
      • Exception Handling : Throws clause in Java
      • Difference between throw and throws in Java?
      • How to Throw Exceptions in Java
      • What is finally block in java?
    • ►  July (134)
    • ►  June (13)
    • ►  May (2)
    • ►  April (10)
    • ►  March (14)
    • ►  February (18)
    • ►  January (19)
  • ►  2011 (3)
    • ►  December (3)

Categories

  • Home
  • SCJP Objective Questions
  • ArrayList Examples
  • Date & Calendar Examples
  • Files and I/O
  • java.util.zip
  • LinkedList Examples
  • Object Cloning
  • Serialization
  • Wrapper classes
  • Collections Framework
  • Multithreading
  • HashSet Examples
  • TreeSet Examples
  • Utility class - Collections
  • HashMap Examples
  • String Examples
  • TreeMap Examples
  • Exception Handling

Search This Blog

Followers

blog status

Popular Posts

  • Exception Handling : Throws clause in Java
    The throws   is used for specifying the exceptions thrown by a method. If a method doesn't catch the checked exceptions that can occur w...
  • Java Language Fundamentals- Objective Questions -Part 5
    1) What will be the output of the program? public class Test {     public static void main (String args[])     {         String st...
  • Create Zip File From Directory Recursively Using ZipOutputStream in Java
    In this section  , you will learn about how to create a zip file from directory recursively using java.util.zip. ZipOutputStream. Before g...
  • Thread Scheduling in Java
    We know that threads can run concurrently.Is it really running concurrently ? Most computer configurations have a single CPU, so threads a...
  • Convert Wrapper objects to Primitive types in Java
    When you need to convert the value of a wrapper object to a primitive, use one of the many xxxValue() methods. Each of the six numeric wra...
  • Life Cycle of a Thread in Java
    The following diagram shows the  life cycle  of a Java Thread. Thread has following states New Runnable Running Sleeping/Blocked/Wait...
  • Java ClassLoader and Usage of Custom ClassLoader
    The Java Classloader is a part of Java Runtime Environment that dynamically loads Java classes into the Java Virtual Machine. Usually...
  • Object-Oriented concepts - Objective Questions - Part 2
    1) class GFC500 {private String name;} class GFC501 {   private String name;   private void setName(String name) {this.name = name;} ...
  • Replace an element at specified index of Java ArrayList Example
    This Java Example shows how to replace an element at specified index of java ArrayList object using set method. import java.util.ArrayLi...
  • Exception Handling -Objective Questions -Part 2
    1) class A {A() throws Exception {}} // 1 class B extends A {B() throws Exception {}} // 2 class C extends A {C() {}} // 3 Which of ...
Powered by Blogger.