• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

please send me the answer

 
praveen kumar tummala
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
import java.util.*;
import java.io.*;
public class dateandtime extends Thread
{
long a;
public void run()
{
while(true)
{
try{
Date dt=new Date();
System.out.println("date and time is:"+dt);
Thread.sleep(1000);
}
catch(Exception e)
{
}
}
}
public static void main(String[] args)
{
dateandtime d=new dateandtime();
d.setPriority(7);
d.start();
}
}

here time and date is coming in line by line

how to print the date and time in one line in command prompt with time is changing.....

and also

how to convert java to .exe in written reply in message

and also

how to break the infinite loop in editplus

please send me thank you
[ March 03, 2006: Message edited by: praveen kumar tummala ]
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The principle of this forum is to help you find the solution to your own problems.
First attempt the problem yourself - explain where you are having difficulties in understanding and we will help you. You may post portions of your code here (between [C0DE][/C0DE] brackets) and any compiler messages you do not understand.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should also read http://faq.javaranch.com/view?UseAMeaningfulSubjectLine - having to threads with the same subject, but totally different content in the same forum is very confusing.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic