import mypackages.ConsoleIO.ConsoleIO;
import java.io.*;
class CurrentTime
{
public static void main(String [] srgs)
{
long time;
String s1="",s2="",s3="";
System.out.print("Enter your full name : ");
try
{
s1=ConsoleIO.readString();
s2=ConsoleIO.readString();
s3=ConsoleIO.readString();
}
catch(IOException ioe)
{
}
s1 = s1.toUpperCase();
s2.toUpperCase();
s3.toUpperCase();
System.out.println("Your first name is : "+s1);
System.out.println("Your middle name is : "+s2);
System.out.println("Your last name is : "+s3);
time=System.currentTimeMillis();
System.out.println("Current time is :- "+(int)time/3600000+":"+(int)time/60000+":"+(int)time/1000);
}
}
import java.io.*;
class CurrentTime
{
public static void main(String [] srgs)
{
long time;
String s1="",s2="",s3="";
System.out.print("Enter your full name : ");
try
{
s1=ConsoleIO.readString();
s2=ConsoleIO.readString();
s3=ConsoleIO.readString();
}
catch(IOException ioe)
{
}
s1 = s1.toUpperCase();
s2.toUpperCase();
s3.toUpperCase();
System.out.println("Your first name is : "+s1);
System.out.println("Your middle name is : "+s2);
System.out.println("Your last name is : "+s3);
time=System.currentTimeMillis();
System.out.println("Current time is :- "+(int)time/3600000+":"+(int)time/60000+":"+(int)time/1000);
}
}
No comments:
Post a Comment