Home Tutorialhelp Comment Need Clarification

 
 

Comment

jayanthi
Need Clarification ,
July 15, 2010 at 11:13 AM

Can you please reason the output of the below code..


import java.util.*;
import java.text.*;
public class StringToDate {
public static void main(String[] args) {
try { String str_date="2010-07-09T12:50:58";
DateFormat formatter ;
Date date ;
formatter = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss");
date = (Date)formatter.parse(str_date);
System.out.println("Today is " +date );
} catch (ParseException e)
{System.out.println("Exception :"+e); }

}
}

output:Today is Fri Jul 09 00:50:58 IST 2010

View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
Java Beginners

further clarification needed - Java Beginners
further clarification needed  Dear Experts, I refer to the last answer you have written to me. The good news is that there's no error already but the code is still not working for me. As Tsuch, I hope to clarify about 

Java Beginners

Excel conversion tool. - Java Beginners
Excel conversion tool.  Hi, I need a conversion tool which can convert .xls(Excel 2003) to .xlsx (Excel 2007) and vice-versa. Please suggest any links ro tools. Thank You 

Development process Questions

Conversion - Development process
Conversion  Why is there a need to convert from Java to .NET? What is the theory of conversion from java to .NET? How it is done?   Hi... Conversion Assistant (JLCA). Code that calls Java APIs can convert to comparable C# code 

Java Beginners

java conversion
java conversion  how do i convert String date="Aug 31, 2012 19:23:17.907339000 IST" to long value 

Java Beginners

String to Date Conversion - Java Beginners
)); For read more information : http://www.roseindia.net/java/java-conversion.... Hence I need some help for converting my String Date format to Date format, so... but all those are giving me GMT etc. I just need the format 11/SEP/2008 07:07:32 

Java Beginners

Reports to pdf conversion
Reports to pdf conversion  I need to convert reports into pdf format using java.. Will i get any sample code 

Java Beginners

object conversion - Java Beginners
/java-conversion/ObjectToDouble.shtml Thanks... sandeep kumar suman...object conversion   Hi, Can anybody tell me the object conversion in java.   Hi sandeep Can u please tell me in details about your 

Applet Questions

conversion Applet
conversion Applet  I am a java beginner.................. strong texthow to create JApplet that prompts the user to enter a distance in miles in a JTextField and then converts mile to kilometers and display the result as XX.XX 

Java Beginners

Java Conversion Question - Java Beginners
Java Conversion Question   Hello sir ,How i can Convert Java Code to Vb.net ,Plz Help Me 

Java Beginners

Language Conversion
Language Conversion  write a java program to convert "Hello World" in spanish 

Java Beginners

html2xml conversion
html2xml conversion  java code to convert html file to xml 

Java Beginners

Type Conversion - Java Beginners
for conversion 

Java Beginners

image conversion tools
image conversion tools  how many tools are available in image conversion at particularlly in java 

UML Questions

hexadecimal conversion java compilation - UML
hexadecimal conversion java compilation  write a simple program..., Please visit the following links: http://www.roseindia.net/java/java-conversion/BinaryToHexa.shtml http://www.roseindia.net/java/java-conversion 

Java Beginners

Distance conversion - Java Beginners
Distance conversion  Write an application that reads a distance in metres. The program will then present a user menu of conversion types, converting the distance to kilometres, feet and inches, according to the user?s selection 

General

Java Date Conversion
Java Date Conversion In java date conversion, two packages are used... StringToDate.java C:\date>java StringToDate Today is Mon Jun 11 00:00:00... seconds and even then only Java provides implementation that actually track leap 

Java Beginners

form to java script conversion
form to java script conversion  I am using a form one more form cotain a piece of code . how to convert it to java script to function it properly? code is shown below <form action="http://www.google.com" id="cse-search 

Java Beginners

conversion - Java Beginners
 

Java Beginners

Java To Vb.Net Conversion - Java Beginners
Java To Vb.Net Conversion  How to convert Java Code To VB.net,which Software is useful to convert java to vb.net,plz Help Me 

Development process Questions

Java code for conversion between .xls and .xlsx or vice versa - Development process
Java code for conversion between .xls and .xlsx or vice versa  I've...) and clients may be using MS Excel 2007 / 2010 (.xlsx) format. I need a solution or tool in Java for converting between .xls to .xlsx or Vice versa 

Java Beginners

Another distance conversion - Java Beginners
a method for each conversion ? toKilometres(), toFeet(), and toInches 

Java Beginners

PDF to Word Conversion - Java Beginners
PDF to Word Conversion  Hello, Can we convert a PDF document to Microsoft word document thru Java. If its not possible in Java, is it possible in any other language 

Java Interview Questions

Conversion In Collections - Java Interview Questions
Conversion In Collections  Hi Friends, can u give code to convert ArrayList to HashMap and HashMap to ArrayList. Thanks Prakash  Hi Friend, 1)Convert ArrayList To HashMap: import java.io.*; import java.util. 

Date Calendar

Java Date conversion - Date Calendar
Java Date conversion  How do I convert 'Mon Mar 28 00:00:00 IST 1983' which is a java.util.Date or String to yyyy/MM/dd date format in sql 

Java Beginners

HSSFCell to String type conversion
://www.roseindia.net/tutorial/java/poi/readExcelFile.html 

Java Beginners

pdf to xml conversion
pdf to xml conversion  i want to convert pdf file into xml file.. where i am having a table in pdf file with some headers and some data into it. i want the headers to be the tag of xml file. how can i do that using java? please 

Framework Questions

need of frameworks in java?
need of frameworks in java?  What is need of frameworks in java 

Framework Questions

need of frameworks in java?
need of frameworks in java?  What is need of frameworks in java 

Framework Questions

need of frameworks in java?
need of frameworks in java?  What is need of frameworks in java 

Framework Questions

need of frameworks in java?
need of frameworks in java?  What is need of frameworks in java 

Java Beginners

Conversion from color to Gray Image - Java Beginners
Conversion from color to Gray Image  Hi... Sakthi here.. i am new to java. and i haven't try this so far How to convert the color image to gray scale image in java? could u plz help me out to start the process 

Development process Questions

java code for conversion of arraylist to string - Development process
java code for conversion of arraylist to string  Hi, i have an arraylist contains [a,b,value,c,d,value]when ever value comes it will split into seperation.fo that i want to convert into string, after that split the string 

Java Beginners

need sourcecode - Java Beginners
need sourcecode  Hai, I need program for packetization for videos 

JavaMail Questions

need of java coding - JavaMail
need of java coding  Design a java interface for ADT stack. Develop it and implement the interface using link list. Provide necessary exception handling for that implementations. pls mail me this lab program..its urgent 

Java Beginners

need of code
need of code  howto convert greyscale image to binary image in java 

JSP Servlet Questions

Need help on JAVA JSP
Need help on JAVA JSP  Hi, I have never worked on java and I have... using JAVA JSP). e.g. Tool does not adjust with the resolution of the screen(need to know how I can adjust it based on the cureen system's screen resolution 

Java Beginners

what is the need of... - Java Beginners
what is the need of...   what is the need of " return type like void ?   Hi Friend, In java, method always require a return type.The main method is the client code therefore jvm does not expected any return 

Swing AWT

need a java program for the following
need a java program for the following  Write a java program with three horizontal sliders. Name the sliders, the first one as red, the second one as green and the third one as blue. You design the program such that on varying 

Java Beginners

Need Help in Java programming
Need Help in Java programming  Hello. Can someone please help me with writing the following program Java program that gives assignment details such as:assignment number,assignment name,due date,submission date,percentage marks 

Java Beginners

Need to create a java applet
Need to create a java applet   Hi people i need to create a java applet for which there will be 2 buttons to indicate small and big. I need to make a circle. When i click small the circle should be small and when i click big 

Java Beginners

need java code - Java Beginners
need java code  I want java code for connect to bit.ly and our link is converted into shorten link and give me response. as a converted link 

Java Beginners

ascii to thai language conversion - Java Beginners
 

Java Beginners

Need Help - Java Beginners
Need Help  Hello Sir, Am a beginner of Java. Also i did course... projects in Java as well as J2EE... Can u help me and guide to do a project.../reference/tutorials/ http://netbeans.org/kb/trails/java-ee.html http 

Java Beginners

need a java program - Java Beginners
need a java program  Draw a bar chart for the following data using frames Year: 2000 2001 2002 2003 2004 2005 TurnOver:7 8 4 5 9 12 

Java Beginners

need code - Java Beginners
need code   i want to take the html coding. if user give a input html file the out is html coding in text file. i want to take html coding only. (view -> source) . how it is possible in java.  Hi Friend, Here we 

Java Beginners

need help - Java Beginners
need help  Need help in programming in Java  Simple java program that will show the output within quotes using system.out.println();DISPLAYING OUPUT " * " ," *** " ........I used System.out.print 

Java Beginners

Need a java program
Need a java program  Write a code of java to print the fibonacci series.   for(int j=1;j<=5;j++) { int i,a,b,c; a=1;b=1;int n=5; System.out.print("fibonicci series is " + a +" " + b 

Java Beginners

need program - Java Beginners
need program  I need a java program to get the multiple student name and mark.display the student information by sorting the marks in ascending or desending order.  Hi Friend, Try the following code: import 

Java Beginners

need help with a program - Java Beginners
Java algorithm - need help with a program  Java algorithm - need help with a program 

Java Beginners

Need help - Java Beginners
Need help   To Write a Java program that asks the users to enter a m * n matrix of integers, m and n being the number of rows and columns, respectively. The program stores this matrix into a two dimensional m*n array 

Struts Questions

jsp to struts 2 action conversion problem - Struts
jsp to struts 2 action conversion problem  i have one jsp page that includes 3 other jsp pages(using RequestDispactcher).how to convert that jsp...(i.e no java code is involved).remaining pages involve java code.  Hi 

Applet Questions

need a login applet in java
need a login applet in java  i'm java beginner. Can some java master teach me how to write a login applet? combine with my coding import javax.swing.*; import java.applet.*; import java.awt.*; import java.util.*; import 

Applet Questions

need a login applet in java
need a login applet in java  i'm java beginner. Can some java master teach me how to write a login applet? combine with my coding import javax.swing.*; import java.applet.*; import java.awt.*; import java.util.*; import 

Java Beginners

Need help in java programming
Need help in java programming  Hello. Can someone please help me with writig the following programm. Assignment 20% Presentation 10% Mini Test 10% Exam 60% Java program that accepts the following details: student 

Java Beginners

code need - Java Beginners
code need  hi i want to code doing for this. If i have enter the text file in my java project. example input is 1,2,3,4,5(it is in input text file) Out put 1, 2, 3, 4, How to do this. (output is print another text file 

Java Beginners

need project
need project  hi im new on this site so dnt knw actual procedure . but i need a project on banking system in java with sql database. which should... is good plz add it i need project till Saturday i.e 10th march 2012 plzzzz 

Java Beginners

java - need code - Java Beginners
java - need code  i am java developer. i want to remove file from one folder and same file is paste another folder. i need this code. (java)  hi, I am sending you the code which moves the file from one folder 

JUNIT Questions

Need of JUnit
Need of JUnit  Hi sir, What makes JUnit better than other testing tools for Java Unit testing?   Hi friend.. It is better to know... and they check their own results and provide immediate feedback. There's no need 

Java Beginners

need help. - Java Beginners
 

JavaScript Questions

Small clarification
 

Java Beginners

need java code - Java Beginners
need java code  i want a program for an algorithm in java which is it has some transactions T1=ABCE T2=CDE T3=DE T4=CDEG T5=BG T6... result . For this algorithm i need a program can any help me 

Java Beginners

Need an Example of calendar event in java
Need an Example of calendar event in java  can somebody give me an example of calendar event of java 

Java Beginners

need help with a program - Java Beginners
need help with a program   Part I An algorithm describes how... by the user. The output of the program should be the length and width (entered.... First you would need to make up the "test data". For this algorithm, the test data 

Java Beginners

Core Java-java.util.date - Java Beginners
); } } } For more information on Java Conversion Visit to : http://www.roseindia.net/java/java-conversion/ Thanks Vineet...Core Java-java.util.date   How we can convert string to Date   

JDBC Questions

Need Java Source Code - JDBC
Need Java Source Code  I have a textfield for EmployeeId in which the Id, for eg: "E001" has to be generated automatically when ever i click on the that textfield for every employees. Can u please tell me how this can 

General

Java Conversion
Java Conversion      ... are trying to make understand the conversion of an input stream into an output... to ByteArray Here we will learn the conversion of an input stream into a byte 

Java Beginners

Java Programming Need Help ASAP
Java Programming Need Help ASAP  You are required to develop..., maths mark, communications mark. You will then need accessor and mutator methods... class that creates an array of Students and handles it. You will need 

Java Beginners

Desperately need Java program ASAP - Java Beginners
Desperately need Java program ASAP  I need the source code for a java application that asks the user to enter a 10 character telephone number... should display 555-438-3663. I need this program ASAP if possible. Thank you 

Java Beginners

Need to have a Java Code - Java Beginners
Need to have a Java Code  Dear Friend, Can we run a unix command like "df -tg" in a remote linux system through FTP server using Java Program? Kindly give me the solution for the above query. Thanks & Regards 

Java Beginners

Need *Help fixing this - Java Beginners
Need *Help fixing this  I need to make this program prompt user... and maybe add retrieve function //need help with this one badly. Thanks guys for all...) { } } public static void main(String args[]){ //need to add: prompt 

Java Beginners

This is what i need - Java Beginners
. for this question i need just : one function can read string like (I like 

Development process Questions

Need to develop Java Program - Development process
Need to develop Java Program  Develop multi-threaded echo server and a corresponding GUI client in Java 

JSP Servlet Questions

clarification in jsp - JSP-Servlet
clarification in jsp  Hi did jsp supports post method to send values to next jsp? if possible how to use post method in jsp?and what is the default method(get/post) of jsp?  Hi Friend, Yes jsp supports Post 

Hibernate Interview Questions

what is java and why do i need it?
what is java and why do i need it?  Hi, Please tell me what is Java and why do i need it? Is it free to download? Also explain me how to write and test my first Java Application? What is the configuration or system requirement 

Development process Questions

Need to develop Java Program - Development process
Need to develop Java Program  [Mini-Project] Develop a programmer's editor in Java that supports syntax-highlighting, compilation support, debugging support, etc 

Java Beginners

i need a java code for finding typemismatch in an editor.
i need a java code for finding typemismatch in an editor.  hi im sriram, i need a java code in such a way that typemismatch code is embedded with the simple java editor. the sample output is shown below !alt text 

General

Java Conversion
 

Java Beginners

need ENUM examples
need ENUM examples  i need enum sample examples   Hi Friend...{ C, Java, DOTNET, PERL } public static void main(String[] args){ int... the following link: http://www.roseindia.net/java/master-java/enum.shtml 

Development process Questions

Need to develop Java Program - Development process
Need to develop Java Program  Develop a simple OPAC system for library using even-driven and concurrent programming paradigms of Java. Use JDBC to connect to a back-end database 

Java Beginners

guys,, need help,, in java programing,, arrays
guys,, need help,, in java programing,, arrays  create a program where you will input 10 numbers and arrange it in ascending way using arrays 

Java Beginners

need model coding in java - Java Beginners
need model coding in java  i want model a program for an algorithm in java which is it has some transactions T1=ABCE T2=CDE T3=DE T4=CDEG T5=BG T6=AE T7=BCG T8=C T9=A now compare T9=A and T6=AE 

Java Beginners

need help on writing a program. - Java Beginners
Writing first Java Program  Hi, I need help to write my first Java... roseIndia to get your query solved. check given link to see the solution of your Java problem.http://www.roseindia.net/java/simple-java-program.shtmlThanks 

Applet Questions

Simple Java applet that need usernam, password and textfield.
Simple Java applet that need usernam, password and textfield.  Hi. Anyone can help me on this matter: I need to create a small application that require user to login by username and password. After login, they should meet 

Java Beginners

Need a Code to calculate hair density in java
Need a Code to calculate hair density in java  Hello, Would you please give me a code to calculate the hair density on scalp from image in java 

Java Beginners

need java code for <company:loc="bang">
need java code for   hi i want to write code like , i used setAttribute method for this. but its showing ERROR: 'Namespace for prefix 'company... me to write this syntax in java 

Java Beginners

Need an example of basic code.
simple so I was hoping java would look more impressive. So I just need a visual...Need an example of basic code.   Im working on an art project that I... appreciate the help. basically I need to see what this would look like: create 

Java Beginners

Need an example of basic code.
simple so I was hoping java would look more impressive. So I just need a visual...Need an example of basic code.   Im working on an art project that I... appreciate the help. basically I need to see what this would look like: create 

Java Beginners

Need an example of basic code.
simple so I was hoping java would look more impressive. So I just need a visual...Need an example of basic code.   Im working on an art project that I... appreciate the help. basically I need to see what this would look like: create 

Development process Questions

Need to develop Java Program - Development process
Need to develop Java Program  Design classes for Currency, Rupee, and Dollar. Write a program that randomly generates Rupee and Dollar objects and write them into a file using object serialization. Write another program to read 

Java Beginners

I need your help - Java Beginners
I need your help  What is the purpose of garbage collection in Java, and when is it used?  Hi check out this url : http://www.artima.com/insidejvm/ed2/gc.html http://java.sun.com/javase/technologies/hotspot 

Java Beginners

I need add my java program with a picture.
I need add my java program with a picture.  Good evng Frnds Friends i created 1 jar file in my desktop. I need add this program with 1 picture. Whenever the user double clicking on that picture The program must start instead 

Development process Questions

Need to develop Java Program - Development process
Need to develop Java Program  Write a multi-threaded Java program to print all numbers below 100,000 that are both prime and fibonacci number (some examples are 2, 3, 5, 13, etc.). Design a thread that generates prime numbers 

Java Beginners

need to solve the below question - Java Beginners
need to solve the below question  I need to write an application that uses the circle class.it must read a radius of a circle from the user .create a circle object and return the object 

Java Beginners

hello there i need help
hello there i need help  : i need to do a program like... i am a beginner, and aside from that i am really eager to learn java please help me with the codes and please explain to me how it works. i only need to use 

PHP Questions

Byte array to PDF Conversion
dont want that now. It is not neccessary that i need PDF.Any Uneditable format 

Java Beginners

Conversion of unicode to its corresponding character
Conversion of unicode to its corresponding character  i have a string of unicodes e.g String s="\c0059\c0049\c3000" .. i need code for converting these unicodes to its corresponding alphabets.. pls if possible rep asap as i need 

Hibernate Questions

Need for hibernate - Hibernate
Need for hibernate  Can anyone say why should we go for hibernate... oriented concept like java. It has better compatibility with java than sql. In Jdbc we have to mannualy handle exception We need to open/cose the connection 

Java Tips and Examples

Conversion of Decimal to Binary in Java
Conversion of Decimal to Binary  in Java In this section we will discuss about conversion of Decimal to Binary in Java. You know that number having.... Now here is the code for conversion.  class Conversion { public static 

Java Beginners

java
java  Hi friends and how are you? i have a problem i need to write a java program which has a two java packages, one has the interface and the other has classes, with each class calculating the conversion of the South african 

Java Beginners

java
to this: Hi friends and how are you? i have a problem i need to write a java program which has a two java packages, one has the interface and the other has classes, with each class calculating the conversion of the South african rand to US dollar 

Advertisements Advertisements
 

 

 

DMCA.com